Oto kod wy艣wietlania monet:
Spoiler
A to kod odpowiadaj膮cy za wy艣wietlanie HUD w diablomodzie:public ShowCoins(id){聽聽聽聽id -= TASK_SHOW_COINS;聽聽聽聽聽聽聽聽if(!is_user_alive(id))聽聽聽聽{聽聽聽聽聽聽聽聽remove_task(id + TASK_SHOW_COINS);聽聽聽聽聽聽聽聽return;聽聽聽聽}聽聽聽聽聽聽聽聽set_hudmessage(0, 255, 0, 0.02, 0.23, 0, 0.0, 0.3, 0.0, 0.0);聽聽聽聽ShowSyncHudMsg(id, sync_hud_obj, "^n^n^n^n^n^n^n[Monety: %i]", player_coins[id]);}public ResetHUD(id){聽聽聽聽if(!task_exists(id+TASK_SHOW_COINS))聽聽聽聽聽聽聽聽set_task(0.1, "ShowCoins", id + TASK_SHOW_COINS, _, _, "b");}
Spoiler
public writeHud(id){聽聽聽聽 聽聽聽聽if(is_user_connected( id ) && !is_user_alive(id)){聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽static iSpec ;聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽iSpec聽聽聽聽=聽聽聽聽pev( id , pev_iuser2 );聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽if( !is_user_alive( iSpec ) ){聽聽聽聽聽聽聽聽聽聽聽聽return PLUGIN_CONTINUE;聽聽聽聽聽聽聽聽}聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽static szName[ 64 ] , szClass[ 256 ] , szItem[ 256 ];聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽get_user_name( iSpec , szName , charsmax( szName ) );聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽ArrayGetString( gClassNames , playerInf[ iSpec ][ currentClass ] , szClass , charsmax( szClass ) );聽聽聽聽聽聽聽聽ArrayGetString( gItemName , playerInf[ iSpec ][ currentItem ] , szItem , charsmax( szItem ) );聽聽聽聽聽聽聽聽 聽聽聽聽聽聽聽聽set_hudmessage(255, 255, 255, 0.78, 0.65, 0, 6.0, 3.0, 0.0, 0.0, -1)聽聽聽聽聽聽聽聽show_hudmessage( id , "Nick: %s^nZycie: %d^nPoziom: %i^nKlasa: %s^nPrzedmiot: %s^nInteligencja: %i^nSila: %i^nZwinnosc: %i^nZrecznosc: %i^nArmor: %i^nSzczescie: %i", szName , get_user_health(id) ,聽聽playerInf[ iSpec ][ currentLevel ] , szClass , szItem , playerInf[ iSpec ][ currentInt ] , playerInf[ iSpec ][ currentStr ] , playerInf[ iSpec ][ currentDex ] , playerInf[ iSpec ][ currentAgi ] , playerInf[ iSpec ][ currentArmor ] , playerInf[ iSpec ][ currentLuck ] );聽聽聽聽}聽聽聽聽else if( is_user_alive( id ) ) {聽聽聽聽聽聽聽聽static szMessage[256],聽聽聽聽聽聽聽聽szClass[ MAX_LEN_NAME ],聽聽聽聽聽聽聽聽szItem[ MAX_LEN_NAME ];聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽ArrayGetString(gClassNames,playerInf[id][currentClass],szClass,charsmax( szClass ));聽聽聽聽聽聽聽聽ArrayGetString(gItemName , playerInf[ id ][ currentItem ] , szItem , charsmax( szItem ) );聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽switch( get_pcvar_num( pCvarWriteHudMode ) ){聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽case 0:{聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽if( playerInf[ id ][ currentLevel ] >= MAX_LEVEL ){ 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽formatex(szMessage,charsmax( szMessage ),"Zycie: %d Klasa: %s Level: %i Item: %sMonety: %i",get_user_health(id),szClass,playerInf[id][currentLevel],szItem,cod_get_user_coins(id))聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽else{聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽formatex(szMessage,charsmax( szMessage ),"Zycie: %d Klasa: %s Level: %i ( %0.1f%s ) Item: %sMonety: %i",get_user_health(id),szClass,playerInf[id][currentLevel],((float(playerInf[id][currentExp])-float( LevelXP[playerInf[id][currentLevel]-1]))*100.0)/(float(LevelXP[playerInf[id][currentLevel]])-float(LevelXP[playerInf[id][currentLevel]-1])),"%%",szItem,cod_get_user_coins(id))聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}聽聽聽聽聽聽聽聽聽聽聽聽}聽聽聽聽聽聽聽聽聽聽聽聽case 1:{聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽if( playerInf[ id ][ currentLevel ] >= MAX_LEVEL ){ 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽formatex(szMessage, charsmax(szMessage),"%s[Zycie: %d]^n[Klasa: %s]^n[Level: %i]^n[Item: %s] [ %i ]^n[Monety: %i]", HUD_TEXT , get_user_health(id),szClass,playerInf[id][currentLevel],szItem, playerInf[ id ][ itemDurability ],cod_get_user_coins(id))聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽else{聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽formatex(szMessage, charsmax(szMessage),"%s[Zycie: %d]^n[Klasa: %s]^n[Level: %i] [ %0.1f%s ]^n[Item: %s] [ %i ]^n[Monety: %i]", HUD_TEXT , get_user_health(id) ,szClass,playerInf[id][currentLevel],((float(playerInf[id][currentExp])-float( LevelXP[playerInf[id][currentLevel]-1]))*100.0)/(float(LevelXP[playerInf[id][currentLevel]])-float(LevelXP[playerInf[id][currentLevel]-1])),"%%", szItem, playerInf[ id ][ itemDurability ],cod_get_user_coins(id))聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}聽聽聽聽聽聽聽聽聽聽聽聽}聽聽聽聽聽聽聽聽}聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽static gFW,iRet;聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽static iArrayPass;聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽iArrayPass = PrepareArray(szMessage,256,1);聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽gFW = CreateMultiForward ("diablo_hud_write",ET_IGNORE,FP_CELL,FP_ARRAY,FP_CELL);聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽ExecuteForward(gFW, iRet, id , iArrayPass,charsmax( szMessage ));聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽switch( get_pcvar_num( pCvarWriteHudMode ) ){聽聽聽聽聽聽聽聽聽聽聽聽case 0:{聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽message_begin(MSG_ONE,gmsgStatusText,{0,0,0}, id) 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽write_byte(0) 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽write_string(szMessage) 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽message_end() 聽聽聽聽聽聽聽聽聽聽聽聽}聽聽聽聽聽聽聽聽聽聽聽聽case 1:{聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽set_hudmessage(16, 186, 16, 0.02, 0.21, 0, 6.0, 2.0, 0.0, 0.0, -1)聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 show_hudmessage(id, szMessage)聽聽聽聽聽聽聽聽聽聽聽聽}聽聽聽聽聽聽聽聽}聽聽聽聽}聽聽聽聽 聽聽聽聽return PLUGIN_CONTINUE;}
U偶ytkownik TigerX edytowa艂 ten post 15.02.2013 15:49