Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //DEFINES
- #include <a_samp>
- #include <y_cmd>
- #include <sscanf2>
- //=======================================================================================================//
- //============================ - [ PM to player only he can see this message ] - ========================//
- //=======================================================================================================//
- YCMD:pm(playerid, params[],help)
- {
- #pragma unused help
- {
- new id, message[128];
- if(sscanf(params, "us[128]", id, message)) return SendClientMessage(playerid,-1,"{FF0000}HELP | "BELA"/pm [ID/Name] [text]");
- new string[156];
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, " {FFFFFF}[{F81414}ERROR!{FFFFFF}] {C3C3C3}Wrong ID!");
- format(string,sizeof string, "{FF0000}You sent a message to the player %s [ID:%d]: {FFFFFF}%s", GetName(id) , id, message);
- SendClientMessage(playerid, -1,string);
- format(string,sizeof string ,"{00C0FF}[ID:%d] Player %s sent you a pm: %s",playerid,GetName(playerid),message);
- SendClientMessage(id, -1,string);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment