23.08.2010, 21:43
Ok Sky, since he said he is using sscanf2, your strings will be deprecated since you aren't assigning a size
Remeber that you will need to get the player's name, not sure if you use pName since thats the popular stock to use. But you can still use, GetPlayerName. Up to you, modify it to fit your needs.
pawn Код:
CMD:pm(playerid, params[])
{
new ID, Message[128];
if(sscanf(params, "us[128]", ID, params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /PM < Player ID > < Message >");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_RED, "ERROR: That user is offline!");
format(Message, sizeof(Message), "PM From %s: %s", pName(playerid), params);
SendClientMessage(playerid, GREEN, Message);
format(Message, sizeof(Message), "PM To %s: %s", pName(ID), params);
SendClientMessage(playerid, GREEN, Message);
return 1;
}