25.12.2016, 17:06
Something like this will do I suppose:
pawn Код:
new targetid, text[128];
if (sscanf(params, "us[128]", targetid, text))
return SendClientMessage(playerid, COLOR_GREY, "USAGE: /whisper [playerid/name/maskid] [text]");
if (targetid == INVALID_PLAYER_ID)
{
if ((!sscanf(params, "is[128]", targetid, text) && targetid > MAX_PLAYERS && GetMaskPlayerID(targetid) == INVALID_PLAYER_ID)
|| targetid < MAX_PLAYERS)
return SendClientMessage(playerid, COLOR_LIGHTRED, "You have specified an invalid player.");
}