Remove PermaDisable

remove perma disable when player is offline ..

here is the command for perma disable

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"");
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);
PlayerInfo[TargetID][PermDisable] =1;
SetTimerEx("kick", KICKTIMER, false, "i", TargetID);
AdminMsg(playerid, "apermdisable");
return 1;


What are you trying to do because I dont understand?
Just put

PlayerInfo[TargetID][PermDisable] =0;

under OnPlayerDisconnect if you want it to reset when he leaves

Command makes no sense. How're they permanently disabled if they're just being kicked then the "perm disabled" being reset when they disconnect (even though they're being kicked).

What exactly are you trying to do?

Forum Jump:

Users browsing this thread: 1 Guest(s)