Skip to content

Commit

Permalink
God-mode on WaterFight!
Browse files Browse the repository at this point in the history
Finally added, after the request of everyone
GrannyLVP also requested this.
Well here it is :)
Recheck if you want to.
Fix the errors if there are any.
Thanks

[REF: #107]

-Godey
  • Loading branch information
GodeyLVP committed Feb 28, 2016
1 parent 4e5e264 commit 49b2e72
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pawn/Resources/Minigames/Core/WaterFight.pwn
Expand Up @@ -34,6 +34,10 @@

#define WATER_FIGHT_MAX_RUNTIME 60 // Max time the minigame can run for.

#define WATER_FIGHT_MAX_HEALTH 50000 // Max Health in the minigame.

#define WATER_FIGHT_MIN_HEALTH 100 // Min Health in the minigame.

static bool:waterFightSignedUp[MAX_PLAYERS];
static waterFightPlayers; // Number of players signed up.

Expand Down Expand Up @@ -385,6 +389,7 @@ stock waterFightRemovePlayer(playerid, bool:bLoadData = true)
{
return;
}
SetPlayerHealth(playerid, WATER_FIGHT_MIN_HEALTH);
waterFightPlayers--;
waterFightSignedUp[playerid] = false;

Expand Down Expand Up @@ -434,7 +439,7 @@ stock waterFightSpawnPlayer(playerid)
SetPlayerVirtualWorld(playerid, WATER_FIGHT_WORLD);
ResetPlayerWeapons(playerid);

SetPlayerHealth(playerid, 100);
SetPlayerHealth(playerid, WATER_FIGHT_MAX_HEALTH);
SetPlayerArmour(playerid, 0);
SetPlayerTeam(playerid, 1);

Expand Down Expand Up @@ -537,4 +542,4 @@ stock OnWaterFightCmdText(playerid)
waterFightSignPlayerUp(playerid);

return 1;
}
}

0 comments on commit 49b2e72

Please sign in to comment.