/warn command for players ?
#4

Quote:

CMD:warn(playerid, params[])
{
if(pInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, FactColor[10], "You are not authorized to use that command !");

new id, reason[32], String[128];
if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, FactColor[11], "USAGE: /warn [PlayerID/PartOfName][Reason]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FactColor[11], "That player it's not connected !");

format(String, sizeof(String), "Adm Cmd: %s was kicked by %s, reason: %s - warn", Name(id), Name(playerid), reason);
SendClientMessageToAll(0xA52A2AFF, String);

pInfo[id][pWarnings] ++;

if(pInfo[id][pWarnings] >= 3)
{
Ban(playerid);
return 1;
}
else SetTimerEx("KickPlayer", 300, false, "i", id);

return 1;
}

Got it from Mariciuc Thank you and waitinng your asnwer
Reply


Messages In This Thread
/warn command for players ? - by UnforgiveNNN - 30.07.2015, 06:37
Re: /warn command for players ? - by Mariciuc223 - 30.07.2015, 06:48
Re: /warn command for players ? - by Battlezone - 30.07.2015, 08:51
Re: /warn command for players ? - by UnforgiveNNN - 30.07.2015, 10:22
Re: /warn command for players ? - by Mariciuc223 - 30.07.2015, 10:24
Re: /warn command for players ? - by Battlezone - 30.07.2015, 10:28
Re: /warn command for players ? - by UnforgiveNNN - 30.07.2015, 10:57
Re: /warn command for players ? - by Battlezone - 30.07.2015, 10:59
Re: /warn command for players ? - by UnforgiveNNN - 30.07.2015, 11:16
Re: /warn command for players ? - by XXCrazyMan707XX - 31.07.2015, 11:24

Forum Jump:


Users browsing this thread: 1 Guest(s)