dcmd_ban(playerid,params[]) {if(PlayerInfo[playerid][LoggedIn] == 1) {if(PlayerInfo[playerid][Level] >= 4) { new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); if(!strlen(params)) return SendClientMessage(playerid, red, \"Használat: /ban [playerid] [indok]\"); if(!strlen(tmp2)) return SendClientMessage(playerid, red, \"Hiba: kihagytad az indokot\"); new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128]; player1 = strval(tmp); if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid && (PlayerInfo[player1][Level] != ServerInfo[MaxAdminLevel]) ) { GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname)); new year,month,day,hour,minuite,second; getdate(year, month, day); gettime(hour,minuite,second); CMDMessageToAdmins(playerid,\"BAN\"); format(string,sizeof(string),\"{FF0000}[ADMIN]:{00FF00} %s{FFFF00} ki lett tiltva {00FFEA}%s {FFFF00}által! [Dátum: %d/%d/%d] [idõ: %d:%d]\",playername,adminname,params[2],day,month,year,hour,minuite); format(string,sizeof(string),\"{FF0000}[ADMIN]:{00FF00}Indok:{00FFEA} %s\",params[2]); SendClientMessageToAll(grey,string); SaveToFile(\"BanLog\",string); print(string); if(udb_Exists(PlayerName2(player1)) && PlayerInfo[player1][LoggedIn] == 1) dUserSetINT(PlayerName2(player1)).(\"banned\",1); format(string,sizeof(string),\"{FF0000}[ADMIN]:{00FF00} %s{FFFF00} ki lett tiltva {00FFEA}%s {FFFF00}által! [Reason: %s] [Dátum: %d/%d/%d] [idõ: %d:%d]\",playername,adminname,params[2],day,month,year,hour,minuite); format(string,sizeof(string),\"{FF0000}[ADMIN]:{00FF00}Indok:{00FFEA} %s\",params[2]); return BanEx(player1, string); } else return SendClientMessage(playerid, red, \"Nincs csatlakoztatva, magasabb szintû, vagy magadat akartad!\");} else return SendClientMessage(playerid,red,\"Nem elég magas a szinted!\");} else return SendClientMessage(playerid,red,\"Elõsször jelentkezz be\");}
SendClientMessage(playerid, 0xFFFFFFFF, \"Kickelve lettél!\");SetTimerEx(\"KickEx\", 50, false, \"i\", playerid); // Ha 50 ezred mp nem elég, növeld!
forward KickEx(playerid);public KickEx(playerid){ Kick(playerid);}