27.11.2011, 07:26
How do I unban someone from using this command?
Код:
COMMAND:ban(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
new adminname[MAX_PLAYER_NAME],pname[MAX_PLAYER_NAME],otherplayerid, reason[128];
GetPlayerName(otherplayerid,pname,sizeof(pname));
GetPlayerName(playerid,adminname,sizeof(adminname));
if(sscanf(params, "us", otherplayerid, reason))
SendClientMessage(playerid, COL_GREY, "/ban [PlayerID/PlayerName] [Reason]");
else if(otherplayerid == INVALID_PLAYER_ID)
SendClientMessage(playerid, COL_GREY, "This player is not connected!");
else
{
new string[32];
format(string, sizeof(string), "You have been banned by %s! Reason: %s", adminname, reason);
SendClientMessage(otherplayerid, 0xAAAAAAAA, string);
Ban(otherplayerid);
}
}
else
{
SendClientMessage(playerid, 0xAAAAAAAA, "You are not the required level admin!");
}
return 1;
}



, what variable is there to set when theres no connected player?