14.02.2016, 14:57
Quote:
forward KickPlayer(playerid); public KickPlayer(playerid) return Kick(playerid); CMD:ban(playerid, params[]) { if(PlayerInfo[playerid][pLogovan] < 1) return SCM(playerid, -1, "Not logged"); if(PlayerInfo[playerid][pAdmin] < 3) return SCM(playerid, -1, "No perm"); new playerID, reason[32] ; if(sscanf(params, "us[32]", playerID, reason)) return SCM(playerid, COLOR_GREY, "CMD: /ban [id] [reason]"); if(!IsPlayerConnected(playerID)) return SCM(playerid, COLOR_GREY, "Not online!"); new playerName[MAX_PLAYER_NAME], targetName[MAX_PLAYER_NAME], reason[64], string[144], string2[144], id ; GetPlayerName(playerid, playerName, sizeof(playerName)); GetPlayerName(playerID, targetName, sizeof(targetName)); format(string, sizeof(string), "'%s was baned by %s.", targetName, playerName); SCMTL(COLOR_RED, string); SCM(playerid, -1, "you are baned!"); format(string2,sizeof(string2),"SRW; You are baned %s | Reason: %s",playerName,reason); SCM(id,-1,string2); Ban(playerID); format(string, sizeof(string), "'%s was banned by %s |Reason: %s ", targetName, playerName, reason); return SetTimerEx( "KickPlayer", 100, false, "i",player1); } |