23.10.2010, 16:48
hi, im making my admin script from scratch, but im trying to do warn all on my
own i made it all from scratch, but im not getting any errors or warnigns but yes console warnings -.-
but i get this in console

any one know why?
(i think this job is for jeffry
, btw hi jeffry
)
own i made it all from scratch, but im not getting any errors or warnigns but yes console warnings -.-
Code:
dcmd_warn(playerid,params[])
{
new id, string[128],pName[MAX_PLAYER_NAME], p2Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,red, "ERROR: You must be level 2");
if(sscanf(params,"uz",id)) return SendClientMessage(playerid, LGREEN, "USAGE: /warn [playerid] [reason]");
if(PInfo[id][Warnings] == MAX_WARNINGS)
{
GetPlayerName(id,p2Name, sizeof(p2Name));
format(string, sizeof (string),"%s has been kicked [Reason: %s](Warnings: %d/%d)",p2Name, params[2],PInfo[id][Warnings], MAX_WARNINGS);
SendClientMessageToAll(ORANGE,string);
Kick(id);
}
else
{
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id,p2Name, sizeof(p2Name));
PInfo[id][Warnings]++;
format(string, sizeof(string), "Administrator %s has warned %s [Reason: %s][Warnings: %d/%d]",pName, p2Name, params[2], PInfo[id][Warnings], MAX_WARNINGS);
SendClientMessageToAll(ORANGE,string);
}
return 1;
}

any one know why?
(i think this job is for jeffry
, btw hi jeffry
)


