17.10.2013, 11:46
Hi, in my PM command I want to get both players ID. AKA PID and playerid. How do I do this?
Here's my command:
Here's my command:
pawn Код:
CMD:pm(playerid, params[])
{
new PID, message[144], string[144];
if(sscanf(params, "uz", PID, message)) return SCM(playerid, COLOR_GREY, "[Usage]: /PM [PlayerID] [message].");
if(!IsPlayerConnected(PID)) return SCM(playerid, COLOR_LIGHTRED, "[Error]: That player is not connected.");
format(string, sizeof(string), "(( PM From: %s(%d): %s ))", GetName(PID), ID?, message);
SendClientMessage(PID, COLOR_YELLOW, string);
format(string, sizeof(string), "(( PM Sent: %s(%d): %s ))", GetName(playerid), ID?, message);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}