Advertisement
Rapha3L

[FS]PM System

Jun 12th, 2013
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.46 KB | None | 0 0
  1. ////////////////////////////////////////////////////////////////////////////////
  2. // Name: PM System                                                            //
  3. // Author: Rapha3L                                                            //
  4. // Script Version: 1.0                                                        //
  5. // Last Update: 12-06-2013                                                    //
  6. ////////////////////////////////////////////////////////////////////////////////
  7.  
  8. //---[Includes]---//
  9.  
  10. #include <a_samp>
  11. #include <zcmd>
  12. #include <sscanf2>
  13.  
  14. //---[Colors]---//
  15.  
  16. #define GOLD        0xFFD700AA
  17. #define GREEN       0x228B22AA
  18. #define BLUE        0x1E90FFAA
  19. #define ORANGE      0xFF8C00AA
  20.  
  21. //---[Strings]---//
  22.  
  23. new String[256];
  24. new ID;
  25.  
  26. //---[Command]---//
  27.  
  28. CMD:pm(playerid, params[])
  29. {
  30.  new msg[128];
  31.  if(sscanf(params, "us", ID, msg)) return SendClientMessage(playerid, BLUE, "Use: {FFFF00}/pm [id] [Message]");
  32.  if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, ORANGE, "Invalid [ID]");
  33.  format(String, sizeof(String), "{A52A2A}(PM From {1E90FF}[%s]{A52A2A}) {FF8C00}: {FFD700}%s.", nome(playerid), msg);
  34.  SendClientMessage(ID, GOLD, String);
  35.  format(String, sizeof(String), "{A52A2A}(PM To {1E90FF}[%s]{A52A2A}) {FF8C00}: {FFD700}%s.", nome(playerid), msg);
  36.  SendClientMessage(playerid, GOLD, String);
  37.  return 1;
  38. }
  39.  
  40. stock nome(playerid)
  41. {
  42.  new pname[MAX_PLAYER_NAME];
  43.  GetPlayerName(playerid, pname, 24);
  44.  return pname;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement