próbáld meg így CMD:setlevel(playerid, params[]) {if(PlayerInfo[playerid][LoggedIn] == 1) {if(PlayerInfo[playerid][Level] >= 10 || IsPlayerAdmin(playerid)) { new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); if(!strlen(params)) return SendClientMessage(playerid, red, \"Használat: /setlevel [playerid] [szint]\"); new player1, level, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128]; player1 = strval(tmp); if(!strlen(tmp2)) return SendClientMessage(playerid, red, \"Használat: /setlevel [playerid] [szint]\"); level = strval(tmp2); if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) { if(PlayerInfo[player1][LoggedIn] == 1) { if(level > ServerInfo[MaxAdminLevel] ) return SendClientMessage(playerid,red,\"HIBA: Nemlétezõ szint\"); if(level == PlayerInfo[player1][Level]) return SendClientMessage(playerid,red,\"HIBA: A játékosnak már megvan ez a szintje\"); CMDMessageToAdmins(playerid,\"SETLEVEL\"); GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname)); new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second); if(level > 0) format(string,sizeof(string),\"Administrator %s has set you to Administrator Status [level %d]\",adminname, level); else format(string,sizeof(string),\"Administrator %s has set you to Player Status [level %d]\",adminname, level); SendClientMessage(player1,blue,string); if(level > PlayerInfo[player1][Level]) GameTextForPlayer(player1,\"Promoted\", 2000, 3); else GameTextForPlayer(player1,\"Demoted\", 2000, 3); format(string,sizeof(string),\"Az admin szintjét fokoztad %s-nek szint %d nap %d/%d/%d óra %d:%d:%d\", playername, level, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string); format(string,sizeof(string),\"Adminisztrátor %s fokozta az admin szintjét %s-nek szint %d nap %d/%d/%d óra %d:%d:%d\",adminname, playername, level, day, month, year, hour, minute, second); SaveToFile(\"AdminLog\",string); dUserSetINT(PlayerName2(player1)).(\"level\",(level)); PlayerInfo[player1][Level] = level; return PlayerPlaySound(player1,1057,0.0,0.0,0.0); } else return SendClientMessage(playerid,red,\"HIBA: A játékos nincs regisztrálva vagy bejelentkezve, hogy fokozd a szintjét\"); } else return SendClientMessage(playerid, red, \"Játékos nincs csatlakozva\");} else return SendClientMessage(playerid,red,\"HIBA: Ehez a parancshoz 5-es szintû adminnak kéne lenned!\");} else return SendClientMessage(playerid,red,\"HIBA: A parancs használatához bekell jelentkezned\");}
CMD:setlevel(playerid, params[]) {if(PlayerInfo[playerid][LoggedIn] == 1) {if(PlayerInfo[playerid][Level] >= 10 || IsPlayerAdmin(playerid)) { new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); if(!strlen(params)) return SendClientMessage(playerid, red, \"Használat: /setlevel [playerid] [szint]\"); new player1, level, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128]; player1 = strval(tmp); if(!strlen(tmp2)) return SendClientMessage(playerid, red, \"Használat: /setlevel [playerid] [szint]\"); level = strval(tmp2); if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) { if(PlayerInfo[player1][LoggedIn] == 1) { if(level > ServerInfo[MaxAdminLevel] ) return SendClientMessage(playerid,red,\"HIBA: Nemlétezõ szint\"); if(level == PlayerInfo[player1][Level]) return SendClientMessage(playerid,red,\"HIBA: A játékosnak már megvan ez a szintje\"); CMDMessageToAdmins(playerid,\"SETLEVEL\"); GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname)); new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second); if(level > 0) format(string,sizeof(string),\"Administrator %s has set you to Administrator Status [level %d]\",adminname, level); else format(string,sizeof(string),\"Administrator %s has set you to Player Status [level %d]\",adminname, level); SendClientMessage(player1,blue,string); if(level > PlayerInfo[player1][Level]) GameTextForPlayer(player1,\"Promoted\", 2000, 3); else GameTextForPlayer(player1,\"Demoted\", 2000, 3); format(string,sizeof(string),\"Az admin szintjét fokoztad %s-nek szint %d nap %d/%d/%d óra %d:%d:%d\", playername, level, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string); format(string,sizeof(string),\"Adminisztrátor %s fokozta az admin szintjét %s-nek szint %d nap %d/%d/%d óra %d:%d:%d\",adminname, playername, level, day, month, year, hour, minute, second); SaveToFile(\"AdminLog\",string); dUserSetINT(PlayerName2(player1)).(\"level\",(level)); PlayerInfo[player1][Level] = level; return PlayerPlaySound(player1,1057,0.0,0.0,0.0); } else return SendClientMessage(playerid,red,\"HIBA: A játékos nincs regisztrálva vagy bejelentkezve, hogy fokozd a szintjét\"); } else return SendClientMessage(playerid, red, \"Játékos nincs csatlakozva\");} else return SendClientMessage(playerid,red,\"HIBA: Ehez a parancshoz 5-es szintû adminnak kéne lenned!\");} else return SendClientMessage(playerid,red,\"HIBA: A parancs használatához bekell jelentkezned\");}