new myTimer;new myCounter;forward kesleltetes(playerid);CMD:kick(playerid,params[]){if(AccInfo[playerid][LoggedIn] == 1){ if(AccInfo[playerid][Level] >= 3){ new tmp2[128]; //------------------------------------------------------------------ if(sscanf(params, \"uS()[128]\", givepid, tmp2)) return SendClientMessage(playerid, LIGHTBLUE2, \"Használat: /kick [iD] [indok]\") && SendClientMessage(playerid, orange, \"Funkció: Kirúghatod vele a játékost a szerverrõl.\"); //------------------------------------------------------------------ new player1, string[128], playername[MAX_PLAYER_NAME], adminname [MAX_PLAYER_NAME]; player1 = givepid; //------------------------------------------------------------------ if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && (AccInfo[player1][Level] != ServerInfo[MaxAdminLevel])) { GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname)); SendCommandToAdmins(playerid,\"Kick\"); //-------------------------------------------------------------- ASts[playerid][Kicks] += 1; //-------------------------------------------------------------- if(!strlen(tmp2)) { format(string,sizeof(string),\"*** {11FF00}%s{AFAFAF} ki lett rúgva a szerverrõl Adminisztrátor {11FF00}%s{AFAFAF} által. (Indok: Nincs meghatározva) ***\",playername,adminname); SendClientMessageToAll(grey,string); SaveIn(\"KickLog\",string); print(string); return Kick(player1); } else { format(string,sizeof(string),\"*** {11FF00}%s{AFAFAF} ki lett rúgva a szerverrõl Adminisztrátor {11FF00}%s{AFAFAF} által (Indok: %s) ***\",playername,adminname,tmp2); SendClientMessageToAll(grey,string); SaveIn(\"KickLog\",string); print(string); SetTimerEx(\"keslelteto\",5000,0,\"i\",playerid); return Kick(player1); } } else return ErrorMessages(playerid, 3);}else return ErrorMessages(playerid, 1);}else return SendClientMessage(playerid,red,\"Hiba: Legalább 3-as szintû adminnak kellne lenned ennek a parancsnak a használatához!\");}public kesletetes(playerid){if( myCounter == 1 ) return KillTimer( myTimer ); //Ellenkezõ esetben folytatjuk a mûveletünket print( \"x\" ); ++myCounter; return 1;}
stock KickFixed(playerid) return SetTimerEx(\"kicked\", 800, false, \"i\", playerid);stock kicked(playerid) return Kick(playerid);
return Kick(player1);
return KickFixed(player1);