25.12.2012, 22:06
I get this message on the console..
Code;
Code;
pawn Код:
CMD:pm(playerid, params[])
{
new PID, message[64], pName[MAX_PLAYER_NAME], Sender[MAX_PLAYER_NAME];
if(sscanf(params, "uz", PID, message)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /PM [PlayerID] [Message].");
if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, COLOR_RED, "That player is not online.");
else {
new Str[256];
GetPlayerName(PID, pName, sizeof(pName));
GetPlayerName(playerid, Sender, sizeof(Sender));
format(Str, sizeof(Str), "(( PM From: %s(%d): %s ))", Sender, playerid, message);
SendClientMessage(PID, COLOR_YELLOW, Str);
format(Str, sizeof(Str), "(( PM Sent: %s(%d): %s ))", pName, PID, message);
SendClientMessage(playerid, COLOR_YELLOW, Str);
}
return 1;
}