26.03.2011, 20:35
How to make PM command? please help me :S
COMMAND:pm(playerid, params[])
{
new text;
new pID;
if(!sscanf(params, "ds", pID, text))
{
if(!IsPlayerConnected(pID))
{
SendClientMessage(playerid,0xFFFFFF,"Player is not in the server!");
}else
{
new name[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "0xFFFFFF [PM]%s say: %s ", name, text);
SendClientMessage(pID,playerid,string);
return 1;
}
}
else return SendClientMessage(playerid, 0xFFFFFF, "USAGE: /pm [id] [Text]");
return true;
}