Posts: 1,241
Threads: 67
Joined: Dec 2013
Quote:
Originally Posted by RedFusion
pawn Код:
CMD:pm(playerid, params[]) { new id, msg[100]; if(sscanf(params, "is", id, msg)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /Pm <playerid> <message>");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This player is not connected!");
if(id == playerid) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot use this on yourself!");
new pname[MAX_PLAYER_NAME+1], string[128]; GetPlayerName(playerid, pname, sizeof(pname)); format(string, sizeof(string), "PM from %s (ID: %i): %s", pname, playerid, msg); SendClientMessage(id, 0x00FF00FF, string);
GetPlayerName(id, pname, sizeof(pname)); format(string, sizeof(string), "PM to %s (ID: %i): %s", pname, id, msg); SendClientMessage(playerid, 0x00FF00FF, string); return 1; }
Renamed the variable used for storing names
|
Wow you look a guy who like to help, Worst thing to do is give him a cmd of PM ready.
He can create by his own if he reads some tutorials.