Advertisement
Guest User

Godmode V5 By EvanA

a guest
Aug 10th, 2013
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.44 KB | None | 0 0
  1. // God-mode by EvanA //
  2. //    Version 5    //
  3. // Feel like /god.
  4.  
  5. #include <a_samp>
  6. #include <zcmd>
  7.  
  8. #define COLOR_SLATEGRAY 0x708090FF
  9. #define COLOR_LIMEGREEN 0x32CD32FF
  10.  
  11. new IsInGod[MAX_PLAYERS];
  12.  
  13. COMMAND:god(playerid, params[])
  14. {
  15.     if(IsPlayerAdmin(playerid))
  16.     {
  17.         if(IsInGod[playerid] == 0)
  18.         {
  19.             IsInGod[playerid] = 1;
  20.             SetPlayerHealth(playerid, 99999999999999999999999999999999999999999999999999999999999999999999);
  21.             SendClientMessage(playerid, 0xFFFFFFFF, "Godmode activated.");
  22.         }
  23.         else if(IsInGod[playerid] == 1)
  24.         {
  25.             IsInGod[playerid] = 0;
  26.             SetPlayerHealth(playerid, 100);
  27.             SendClientMessage(playerid, 0xFFFFFFFF, "Godmode de-activated.");
  28.         }
  29.  
  30.     }
  31.     else SendClientMessage(playerid, 0xFFFFFFFF, "You aren't authorized to use this command.");
  32.     return 1;
  33. }
  34.  
  35. public OnPlayerUpdate(playerid)
  36. {
  37.     if(IsInGod[playerid] == 1) SetPlayerHealth(playerid, 9999999999999999999999999999999999999999);
  38.     return 1;
  39. }
  40.  
  41. public OnPlayerCommandText(playerid, cmdtext[])
  42. {
  43.  if (strcmp("/jetpack", cmdtext, true, 10) == 0)
  44.     {
  45.         if(IsPlayerAdmin(playerid))
  46.         SendClientMessage(playerid, COLOR_LIMEGREEN, "You have given yourself a jetpack!");
  47.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
  48.         return 1;
  49.         SendClientMessage(playerid, COLOR_SLATEGRAY, "You aren't authorized to use this command!");
  50.         return 1;
  51.  }
  52.     return 1;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement