29.05.2014, 00:42
i am was admin 99999 but why this cmd cannot used "Admin Only"
pawn Код:
CMD:adminpm(playerid, params[])
{
new Str[128];
new PID, reason[128];
if(sscanf(params, "us[45]", PID, reason)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /adminpm [PlayerID] [Message]");
if(PlayerInfo[playerid][pAdmin] >= 2) return SendClientMessage(playerid, COLOR_GREY, "Admin Only !");
if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, COLOR_GREY, "That user is not connected!");
{
format(Str, sizeof(Str), "(( PM From: Admin: %s ))", reason);
SendClientMessage(PID, COLOR_RED, Str);
format(Str, sizeof(Str), "(( PM Sent To: %s(%d): %s ))", pName(PID), PID, reason);
SendClientMessage(playerid, COLOR_LIGHTRED, Str);
}
return 1;
}