23.05.2013, 22:53
hey can you help me here is my /ban command
please man help cause i realy need /unban command
Quote:
CMD:ban(playerid,params[]) { if(pInfo[playerid][pAdminLevel] >= 2) { if(IsPlayerConnected(playerid)) { new targetid,reason[105],string[256]; if(sscanf(params, "us[105]", targetid,reason)) return SendClientMessage(playerid,-1,""chat" /ban [playerid] [reason]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online"); format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has banned %s [Reason: %s]",GetAdminName(playerid),PlayerName(playerid),Play erName(targetid),reason); SendClientMessageToAll(-1,string); BanPlayer(targetid,reason,PlayerName(playerid)); } } else { SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!"); } return 1; } |