17.06.2012, 16:26
pawn Код:
CMD:warn(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1 || IsPlayerAdmin(playerid) || PlayerInfo[playerid][pVip] >= 3)
{
//new reason[32];
if(sscanf(params, "rs[32]", targetid, reason))
return SendClientMessage(playerid, COLOR_PURPLE,"Usage: /warn [playerid] [reason]");
if(targetid == playerid) return SendClientMessage(playerid, COLOR_DRED, "You Can't Warn Yourself!");
new str[128],targetid, reason,Name[MAX_PLAYER_NAME],Name1[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
GetPlayerName(targetid, Name1, MAX_PLAYER_NAME);
format(str, sizeof(str), "Administrator %s Has Warned %s Reason: %d!", Name, Name1, reason);
SendClientMessageToAll(COLOR_DRED,str);
Warns[targetid] ++;
}
return true;
}