10.09.2009, 05:36
example PM dcmd.
pawn Код:
dcmd_pm(playerid, params[])
{
new otherid, result[256], string[256];
if(sscanf(params, "us", otherid, result) SendClientMessage(playerid, RED, "Usage: /PM [ID] [MSG]");
// The "us" part is the format of the input. u is for username or playerid and s is for string which is the message.
else
{
format(string, sizeof(string), "PM(%d): %s", playerid, result);
SendClientMessage(otherid, YELLOW, string);
}
return 1;
}