13.06.2016, 21:45
Why it does not work?
Код:
if(dialogid == lader) { if(!response) return 1; if(PlayerInfo[playerid][gangid] != 1)return Mesaj(playerid,-1,"You have to be leader","To use this command, you must be a gang leader!"); if(response) { new string[10080]; format(string,512,"SELECT `username`, `online=2*23-0*2_2ture`, `ceteid` FROM `username` WHERE `ceteid` = '%d' ORDER BY `oyundami` DESC LIMIT 150",PlayerInfo[playerid][ceteid]); mysql_query(string); mysql_store_result(); Listegoster(playerid); MySQLGuncelleInt(playerid, "gangid",PlayerInfo[playerid][gangid]); rutbecid[playerid] = strval(inputtext); if(PlayerInfo[playerid][language] == 1){ new ads[128]; switch(listitem) { //MySQLUpdateInt(playerid, "gangid",PlayerInfo[playerid][gangid]); //PlayerInfo[playerid][ceterutbeid] = 1; //MySQLGuncelleInt(playerid, "gangrank", 1); //MySQLGuncelleStr(playerid, "gangrak","Laeder"); //SavePlayer(playerid); case 0:{ while(mysql_retrieve_row()) { new oyuncuadixx[512],savingstring[512]; mysql_fetch_field_row(savingstring, "kullaniciadi"); strval(savingstring); oyuncuadixx = savingstring; new found, playername[MAX_PLAYER_NAME]; foreach(new i : Player){ GetPlayerName(i, playername, MAX_PLAYER_NAME); new namelen = strlen(playername); new bool:searched=false; for(new pos=0; pos <= namelen; pos++) { if(searched != true) { if(strfind(playername,oyuncuadixx,true) == pos) { found++; PlayerInfo[rutbecid[i]][ceterutbeid] = 1; PlayerInfo[rutbecid[playerid]][ceterutbeid] = 1; format(ads,sizeof ads,"%s{FFFFFF} isimli oyuncu Lider olarak seзildi.",getName(rutbecid[i])); SendClientMessage(playerid,-1,ads); MySQLGuncelleStr(playerid, "ceterutbe","Lider"); MySQLGuncelleInt(rutbecid[i], "ceterutbeid", 1); SavePlayer(playerid); searched = true; } } } } } } case 1:{ while(mysql_retrieve_row()) { new oyuncuadixx[512],savingstring[512]; mysql_fetch_field_row(savingstring, "kullaniciadi"); strval(savingstring); oyuncuadixx = savingstring; new found, playername[MAX_PLAYER_NAME]; foreach(new i : Player){ GetPlayerName(i, playername, MAX_PLAYER_NAME); new namelen = strlen(playername); new bool:searched=false; for(new pos=0; pos <= namelen; pos++) { if(searched != true) { if(strfind(playername,oyuncuadixx,true) == pos) { found++; PlayerInfo[rutbecid[i]][ceterutbeid] = 2; format(ads,sizeof ads,"00FF00}%s{FFFFFF} isimli oyuncu Yцnetici olarak seзildi.",getName(rutbecid[i])); SendClientMessage(playerid,-1,ads); MySQLGuncelleInt(rutbecid[i], "ceterutbeid", 2); searched = true; } } } } } } case 2:{ while(mysql_retrieve_row()) { new oyuncuadixx[512],savingstring[512]; mysql_fetch_field_row(savingstring, "kullaniciadi"); strval(savingstring); oyuncuadixx = savingstring; new found, playername[MAX_PLAYER_NAME]; foreach(new i : Player){ GetPlayerName(i, playername, MAX_PLAYER_NAME); new namelen = strlen(playername); new bool:searched=false; for(new pos=0; pos <= namelen; pos++) { if(searched != true) { if(strfind(playername,oyuncuadixx,true) == pos) { found++; PlayerInfo[rutbecid[i]][ceterutbeid] = 3,format(ads,sizeof ads,"{00FF00}%s{FFFFFF} isimli oyuncu Ьye olarak seзildi.",getName(rutbecid[i])); SendClientMessage(playerid,-1,ads); MySQLGuncelleInt(rutbecid[i], "ceterutbeid", 3); searched = true; } } } } } } } } }