27.11.2014, 11:05
Yo Guys 
i made a simple admin system
And i made the commands
I have /warn
But i want /resetwarnings (wich will Reset player warnings
)
Can anyone tell me ? i tryed my best but i couldn't do it*
Here is my Warn CMD:

i made a simple admin system
And i made the commands
I have /warn
But i want /resetwarnings (wich will Reset player warnings
) Can anyone tell me ? i tryed my best but i couldn't do it*
Here is my Warn CMD:
Код:
CMD:warn(playerid, params[])
{
if(pInfo[playerid][pLevel] >= 1)
{
new id,reason[50];
if(sscanf(params, "us[50]", id,reason)) return SendClientMessage(playerid, yellow, "Usage: /warn <Player ID/Part of Name> <Reason>");
//if(id == playerid) return SendClientMessage(playerid, red, "You can not warn yourself!");
if(IsPlayerConnected(id))
{
pInfo[id][Warns]++;
CommandToAdmins(playerid,"warn");
if(pInfo[id][Warns] > 2)
{
format(string,sizeof(string),"Administrator '%s' has kicked '%s' for: %s | Warnings: %d/%d |",GetName(playerid),GetName(id),reason,pInfo[id][Warns],MAX_WARNS);
SendClientMessageToAll(red,string);
Timer[id] = SetTimerEx("KickPlayer",200,false,"d", id);
return 1;
}
format(string,sizeof(string),"Administrator '%s' has given '%s' a Warning | Reason: %s |Warnings: %d/%d|",GetName(playerid),GetName(id),reason,pInfo[id][Warns],MAX_WARNS);
SendClientMessageToAll(red,string);
GameTextForPlayer(id,"~R~Warning ~G~Recived!", 5000, 3);
return 1;
}
else return ShowMessage(playerid, red, 2);
}
else return 0;
}

