SHARE
TWEET

azpm

a guest Apr 13th, 2015 463 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // INC //
  2. #include <a_samp>
  3. #include <zcmd>
  4. main() return true;
  5.  
  6.  
  7. // VAR //
  8. new bool:AzPmStats[MAX_PLAYERS] = false;
  9. new Rec[MAX_PLAYERS];
  10.  
  11.  
  12. // Call Back //
  13. public OnFilterScriptInit()
  14. {
  15.         print("\n--------------------------------------");
  16.         print(" PM AZ By AZULA 2015 pwn scripting ");
  17.         print("--------------------------------------\n");
  18.         return 1;
  19. }
  20.  
  21. public OnFilterScriptExit()
  22. {
  23.         return 1;
  24. }
  25.  
  26.  
  27. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  28. {
  29.     switch(AzPmStats[playerid]) {
  30.             case false: {
  31.                 return true;
  32.                 }
  33.                 case true : {
  34.                     Rec[playerid] = clickedplayerid;
  35.                     ShowPlayerDialog(playerid, 21, DIALOG_STYLE_INPUT, "{FF2EE1}[Az-Pm] :", "{FC0B2F}Please enter your text:", "Send", "Cancel");
  36.                         return true;
  37.                 }
  38.         }
  39.     return 1;
  40. }
  41. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  42. {
  43.     if(dialogid == 21)
  44.     {
  45.         if(!response)
  46.         {
  47.             SendClientMessage(playerid,-1,"{FF2EE1}[Az-Pm] : {FC0B0B}Message failed to send");
  48.             Rec[playerid] = 0;
  49.         }
  50.         else
  51.         {
  52.             new text[512];
  53.             format(text,sizeof(text), "{FF2EE1}[Az-Pm] : {FCF80B}Message from {FC0B2F}%s {FCF80B}ID {FCF80B}(%i) : {FF2EE1}%s.",GetName(playerid),playerid,inputtext);
  54.             SendClientMessage(Rec[playerid],-1,text);
  55.             Rec[playerid] = 0;
  56.         }
  57.         return 1;
  58.     }
  59.  
  60.     return 0;
  61. }
  62.  
  63. // CMD //
  64. COMMAND:azpm(playerid, params[]) // /azpm to switch azPm on or off
  65. {
  66.         switch(AzPmStats[playerid]){
  67.                 case false:{
  68.                 SendClientMessage(playerid,-1,"{FF2EE1}[Az-Pm] : {B6B6B6}Az Pm is On Now Click in the tab score menu to PM players");
  69.                 SendClientMessage(playerid,-1,"{FF2EE1}[Az-Pm] : {FC0B0B}/azpm {B6B6B6}to switch off the pm system");
  70.                 AzPmStats[playerid] = true;
  71.                 return true;
  72.                 }
  73.                 case true :{
  74.                     SendClientMessage(playerid,-1,"{FF2EE1}[Az-Pm] : {B6B6B6}Az Pm is {FC0B2F}Off {B6B6B6}Now");
  75.                 AzPmStats[playerid] = false;
  76.                 return true;
  77.                 }
  78.         }
  79.         return true;
  80. }
  81.  
  82. // stock //
  83. stock GetName(playerid)
  84. {
  85.       new name[MAX_PLAYER_NAME];
  86.       GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  87.       return name;
  88. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top