CMD:apermdisable(playerid, params[]) { new TargetID,Reason[128],str2[128]; if(LoginCheck[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, ""ERROR_MESSAGE""); if(PlayerInfo[playerid][pAdminLevel] < 5) return SendClientMessage(playerid, COLOR_RED, ""ERROR_MESSAGE""); if(sscanf(params, "uS(No Reason Given)[128]", TargetID, Reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /apermdisable (Name / ID) (Reason)"); if(TargetID == INVALID_PLAYER_ID || !IsPlayerConnected(TargetID)) return SendClientMessage(playerid, COLOR_RED, ""CONNECTION_ERROR""); if(PlayerInfo[TargetID][pAdminLevel] >= PlayerInfo[playerid][pAdminLevel]) return SendClientMessage(playerid, COLOR_RED, ""ADMIN_ERROR""); else { new str1[128]; format(str1,sizeof(str1),"***KICK: %s (%d) (PERMANENT DISABLE) %s",pname(TargetID),TargetID,Reason); SendClientMessageToServer(TargetID,COLOR_ADMIN,str 1); format(str2,sizeof(str2),"You Have Been Permanently Disabled By An Admin. Reason: %s",Reason); SendClientMessage(TargetID,COLOR_ADMIN,str2); PlayerInfo[TargetID][PermDisable] =1; SetTimerEx("kick", KICKTIMER, false, "i", TargetID); AdminMsg(playerid, "apermdisable"); } return 1; } |