First off, should of posted this in script request thread #5, although I will still help you (just a tip, use that instead).
This is it:
pawn Код:
CMD:pm(playerid, params[])
{
new message[128], targetid, string[128], string2[128];
if (sscanf(params, "us", targetid, message)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /pm <playerid> <message>");
new pName[MAX_PLAYER_NAME], targetName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerName(targetid, targetName, sizeof(targetName));
format(string, sizeof(string), "*Incoming: %s [%i]: %s*", pName, playerid, message);
format(string2, sizeof(string2), "*Sent: %s [%i]: %s*",targetName, targetid, message);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(targetid, COLOR_YELLOW, string2);
return 1;
}
Compiled fine, never tested it. Tell me if you have problems (notice: could have a simpler way to doing this, but I did it the way I taught myself to do it)
Made with ZCMD and sscanf, need those to do this. Please specify the command processor and such before making this so you can get people to provide correct commands other then making it with their own preferred command processor (in my case).
PS: Please, stop creating threads. Make one thread for everything you need help on. Several threads are a waste of the board.