11.06.2016, 18:41
Try this.
Код:
CMD:pm(playerid, params[]) { new str[128], text[128], targetid; if(sscanf(params, "us", targetid, text)) return SendClientMessage(playerid, -1, "{8EB2D6}SERVER:{FFFFFF} /pm [player] [text]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "{8EB2D6}SERVER:{FFFFFF} Player isn't connected!"); if(playerid == targetid) return SendClientMessage(playerid,-1,"{FF0000}You can't pm yourself."); format(str, sizeof(str), "PM to %s (%d): %s", GetName(targetid), targetid, text); SendClientMessage(playerid, 0xE0E800FF, str); format(str, sizeof(str), "PM from %s (%d): %s", GetName(playerid), playerid, text); SendClientMessage(targetid, 0xE8C900FF, str); return true; }