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 {057CEA}[playerid] {33FF33}[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); format(string,sizeof(string),\"{33FF33}%s {FF0000}bannolva lett {CDF917}%s {33CCFF} által[indok: %s] [Dátum: %d/%d/%d] [idõ: %d:%d]\",playername,adminname,params[2],day,month,year,hour,minuite); 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}%s {CDF917}Adminisztrátor bannolt a szerverröl . {057CEA}Indok: {CDF917}%s\", adminname, params[2] ); return BanEx(player1, string); } else return SendClientMessage(playerid, red, \"A játékos nincs csatlakozva, vagy magadat akartad, vagy magasabb szintû az admint!\");} else return SendClientMessage(playerid,red,\"HIBA: Ehez a parancshoz legalább 4-es szintû adminnak kéne lenned!\");} else return SendClientMessage(playerid,red,\"HIBA: Ehez a parancshoz legalább 4-es szintû adminnak kéne lenned!\");}
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 {057CEA}[playerid] {33FF33}[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); format(string,sizeof(string),\"{33FF33}%s {FF0000}bannolva lett {CDF917}%s {33CCFF} által[indok: %s] [Dátum: %d/%d/%d] [idõ: %d:%d]\",playername,adminname,params[2],day,month,year,hour,minuite); GameTextForPlayer(playerid, \"Bannolva lettél\", 3000, 4); 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}%s {CDF917}Adminisztrátor bannolt a szerverröl . {057CEA}Indok: {CDF917}%s\", adminname, params[2] ); return BanEx(player1, string); } else return SendClientMessage(playerid, red, \"A játékos nincs csatlakozva, vagy magadat akartad, vagy magasabb szintû az admint!\");} else return SendClientMessage(playerid,red,\"HIBA: Ehez a parancshoz legalább 4-es szintû adminnak kéne lenned!\");} else return SendClientMessage(playerid,red,\"HIBA: Ehez a parancshoz legalább 4-es szintû adminnak kéne lenned!\");}
#include <a_samp>#include <zcmd>#include <sscanf2>CMD:ban(playerid, params[]){new id, indok[200], s[200], Nev[MAX_PLAYER_NAME];if(IsPlayerAdmin(playerid)){ if(sscanf(params, \"us\", id, indok)) return SendClientMessage(playerid, -1, \"Használat: /ban [ ID ] [ Indok ]\"); GetPlayerName(playerid, Nev, MAX_PLAYER_NAME);format(s, sizeof(s), \"<<< %s banolt! Indok %s >>>\", Nev); SendClientMessage(id, -1, s); SendClientMessage(playerid, -1, \"Banoltad az illetõt!\"); Ban(id);}else{ SendClientMessage(playerid, -1, \"Nem vagy Admin!\");}return 1;}