25.09.2016, 12:21
Hello,
So i want know how should i made When i use ban command on playerid, this ban will be saved on Scriptfiles and when player try rejoin he will be banned ?
So i want know how should i made When i use ban command on playerid, this ban will be saved on Scriptfiles and when player try rejoin he will be banned ?
Код:
CMD:ban(playerid, params[])
{
if(pInfo[playerid][Level] < 2) return SCM(playerid, red, "You are not allowed to use this command!");
{
new PID;
new reason[64];
new str[128];
new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Adminname, sizeof(Adminname));
GetPlayerName(PID, Playername, sizeof(Playername));
if(sscanf(params, "us[64]", PID,reason)) return SCM(playerid, red, "[USAGE]: /ban (playerid) (reason)");
if(!IsPlayerConnected(PID))
return SCM(playerid, -1, "[ERROR]: Currect player is not found!");
format(str, sizeof(str), "%s has been banned by Administrator %s | %s", Playername, Adminname, reason);
SCMToAll(-1, str);
Ban(PID);
}
return 1;
}


