21.04.2015, 19:57
hello guys i have 2 questions regarding pm command
This is my command code:
First question is when a higher admin will send a pm to any players i dont want lower admin to read higher admins pm.
second question is how to make a replay pm command.
Thanks you very much
This is my command code:
PHP код:
CMD:pm(playerid, params[])
{
new pID, Message[60], string[128], string2[128], aMessage[128];
if(sscanf(params, "us[60]", pID, Message)) return SendClientMessage(playerid, -1, "usage :/Pm [ID] [Message]");
if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"ID not found ");
format(string, sizeof(string), "Private Message From %s (%d): %s", GetPlayerNameEx(playerid), playerid, Message);
format(string2, sizeof(string2), "Private Message %s (%d): %s", GetPlayerNameEx(pID), pID, Message);
SendClientMessage(playerid, -1, string2);
SendClientMessage(pID, -1, string);
PlayerPlaySound(playerid, 4202, 0.0, 0.0, 0.0);
PlayerPlaySound(pID, 4202, 0.0, 0.0, 0.0);
format(aMessage, sizeof aMessage, "%s (%d) To %s (%d): %s", GetPlayerNameEx(playerid), playerid, GetPlayerNameEx(pID), pID, Message);
for(new i; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] >=1 || IsPlayerAdmin(i))SendClientMessage(i, -1, aMessage);
}
return 1;
}
second question is how to make a replay pm command.
Thanks you very much