Advertisement
Guest User

Untitled

a guest
Nov 9th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.22 KB | None | 0 0
  1. #define white        0xFFFFFFFF // define-urile pt comanda
  2. new IsGod[MAX_PLAYERS]; // am adaugat-o in gm langa celelalte new-uri
  3. public OnPlayerUpdate(playerid)  //Din nou,am adaugat unde trebuia
  4. {
  5.     new Float:hp,Float:armour;
  6.     new Float:health;
  7.     new veh = GetPlayerVehicleID(playerid);
  8.     GetPlayerHealth(playerid,hp);
  9.     GetPlayerArmour(playerid,armour);
  10.     GetVehicleHealth(veh, health);
  11.  
  12.     if(IsGod[playerid] == 1)
  13.     {
  14.         if(hp < 999.0) SetPlayerHealth(playerid, 1000.0);
  15.         if(armour < 999.0) SetPlayerArmour(playerid, 1000.0);
  16.         if(health < 999.0) SetVehicleHealth(veh, 1000.0);
  17.     RepairVehicle(veh);
  18.         }
  19.     else if(IsGod[playerid] == 1) return 1;
  20.  
  21.     return 1;
  22. }
  23.  
  24. CMD:god(playerid, params[]) // comanda
  25. {
  26.         if(IsGod[playerid] == 0)
  27.         {
  28.         IsGod[playerid] = 1;
  29.         SetPlayerHealth(playerid, 1000.0);
  30.         SendClientMessage(playerid, white, "God Mode is Activated");
  31.     SetVehicleHealth(playerid, 1000.0);
  32.     }
  33.     else if(IsGod[playerid] == 1)
  34.     {
  35.     IsGod[playerid] = 0;
  36.     SetPlayerHealth(playerid, 100.0);
  37.     SendClientMessage(playerid, white, "God Mode is DeActivated");
  38.     SetVehicleHealth(playerid, 1000.0);
  39.     }
  40.     return 1;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement