02.08.2016, 14:32
PHP Code:
CMD:pm(playerid, params[])
{
new targetid, string[258], tekst[128];
if(sscanf(params, "us[128]", targetid, tekst)) return SendClientMessage(playerid, COLOR_WHITE, "{3BB9FF}use: {FFFFFF}/pm < ID > < tekst >");
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Wrong ID");
format(string, sizeof(string), "[PM][IN] %s: %s", PlayerName(playerid), tekst);
SendClientMessage(targetid, COLOR_YELLOW, string);
format(string, sizeof(string), "[PM][out] %s: %s", PlayerName(targetid), tekst);
SendClientMessage(playerid, COLOR_RED, string);
return 1;
}
I have problem with this command?
If i try to ingame /pm 0 Test
Its says "Wrong ID" Why? )