Advertisement
Msvlad2000

M-Command v1.1

Jan 22nd, 2012
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.52 KB | None | 0 0
  1. //Created by: Msvlad2000
  2. //You can delete the credits :)
  3.  
  4. #define dialog 8132
  5. #define FILTERSCRIPT
  6. #define COLOR_YELLOW 0xFFFF00AA
  7. #define COLOR_WHITE 0xFFFFFFFF
  8. #define IsPlayerNotInVehicle(%0) (!IsPlayerInAnyVehicle(%0))
  9. #include <ladmin>
  10. #include <a_samp>
  11. #if defined FILTERSCRIPT
  12.  
  13. ////////////////////////////////////////////////////////////////////////////////
  14. public OnPlayerCommandText(playerid, cmdtext[])
  15. {
  16.     if (strcmp("/M", cmdtext, true, 10) == 0)
  17.     if(IsPlayerLuxAdmin(playerid))
  18.     {
  19.             ShowPlayerDialog(playerid, dialog, DIALOG_STYLE_LIST, "MCommand - CP", "-  Admin Weapons  -\n-  Admin Heal  -\n-  Admin Armour  -\n-  Spawn All  -", "Spawn", "Cancel");
  20.             return 1;
  21.     }
  22.     else SendClientMessage(playerid, COLOR_WHITE, "ERROR: You not is Administrator");
  23.     return 0;
  24. }
  25.  
  26. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  27. {
  28.  
  29.     if(dialogid == dialog)
  30.     {
  31.         if(response)
  32.         {
  33.             if(listitem == 0)
  34.             {
  35.             GivePlayerWeapon(playerid, 38, 12000);
  36.             GivePlayerWeapon(playerid, 27, 12000);
  37.             GivePlayerWeapon(playerid, 31, 12000);
  38.             GivePlayerWeapon(playerid, 24, 12000);
  39.             GivePlayerWeapon(playerid, 18, 12000);
  40.             GivePlayerWeapon(playerid, 5, 12000);
  41.             GivePlayerWeapon(playerid, 28, 12000);
  42.             PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  43.             GameTextForPlayer(playerid, "~r~Spawned!", 3000, 3);
  44.             }
  45.             if(listitem == 1)
  46.             {
  47.              SetPlayerHealth(playerid, 160);
  48.              PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  49.              GameTextForPlayer(playerid, "~r~spawned!", 1000, 3);
  50.             }
  51.             if(listitem == 2)
  52.             {
  53.              SetPlayerArmour(playerid, 100.0);
  54.              PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  55.              GameTextForPlayer(playerid, "~r~spawned!", 1000, 3);
  56.              }
  57.             if(listitem == 3)
  58.             {
  59.             GivePlayerWeapon(playerid, 38, 12000);
  60.             GivePlayerWeapon(playerid, 27, 12000);
  61.             GivePlayerWeapon(playerid, 31, 12000);
  62.             GivePlayerWeapon(playerid, 24, 12000);
  63.             GivePlayerWeapon(playerid, 18, 12000);
  64.             GivePlayerWeapon(playerid, 5, 12000);
  65.             GivePlayerWeapon(playerid, 28, 12000);
  66.             SetPlayerHealth(playerid, 160);
  67.             SetPlayerArmour(playerid, 100.0);
  68.             PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  69.             GameTextForPlayer(playerid, "~r~spawned all!", 1000, 3);
  70.             }
  71.         }
  72.     }
  73.     return 0;
  74. }
  75. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement