mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-04-19 04:32:53 +00:00
chat_command_god_mode 1.0.2
Give dead silence pro to avoid dying when falling from a high height. This only gives it if the player doesn't have it already and it only takes it away if it was granted by the god mode in the first time
This commit is contained in:
parent
28679c87d7
commit
63ce9a008d
@ -75,6 +75,19 @@ DoGodMode(enabled)
|
||||
health = GetDvarInt("scr_player_maxhealth");
|
||||
}
|
||||
|
||||
deadSilencePro = "specialty_falldamage";
|
||||
|
||||
if (enabled && !self maps\mp\_utility::_hasPerk(deadSilencePro)) // if god mode is on and player doesn't have dead silence pro
|
||||
{
|
||||
self maps\mp\_utility::givePerk(deadSilencePro, false); // give dead silence pro
|
||||
self.pers["god_mode_gave_perk"] = true;
|
||||
}
|
||||
else if (!enabled && self maps\mp\_utility::_hasPerk(deadSilencePro) && self.pers["god_mode_gave_perk"]) // if god mode is off and player has dead silence pro and it was given by god mode on
|
||||
{
|
||||
self maps\mp\_utility::_unsetperk(deadSilencePro); // remove dead silence pro
|
||||
self.pers["god_mode_gave_perk"] = false;
|
||||
}
|
||||
|
||||
self.maxhealth = health;
|
||||
self.health = health;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user