11.11.2013, 20:25
pawn Код:
CMD:apm(playerid, params[])
{
new str[128], str2[128], id;
if(sscanf(params,"ds[128]", id, str2)) return SendClientMessage(playerid, red,"USAGE: /apm [id] [message]");
if(IsPlayerConnected(id))
{
if(id != playerid)
{
if(PlayerInfo[playerid][Level] >= 1)
{
format(str, sizeof(str),"Admin PM to [%d]%s: %s", id, PlayerName2(id), str2);
SendClientMessage(playerid, yellow, str);
format(str, sizeof(str),"[PM]Admin: %s", str2);
SendClientMessage(id, COLOR_PINK, str);
PlayerPlaySound(id,1085,0.0,0.0,0.0);
}
else return SendClientMessage(playerid, red,"You are not a high enough level to use this command");
}
else return SendClientMessage(playerid, red,"You cannot PM yourself");
}
else return SendClientMessage(playerid, red,"Player is not connected");
return 1;
}
P.S.
First time see CMD:apm with so many versions