KoltyZ
Well-Known Member
- Messages
- 2
- Reaction score
- 0
- Points
- 201
hello! i am new to gsc coding and thought making a simple modmenu/trainer would be a good introduction. I am having trouble getting this bit of code to work:
as of right now it just crashes my game. when loading into a map.
help is much appreciated!
god()
{
if(!isDefined(self.gamevars["god"]))
{
self notify("stop_god");
self thread godmode();
self.gamevars["god"] = true;
self IPrintLnBold("^6Godmode ^2ON");
}
else
{
self notify("stop_god");
self.gamevars["god"] = undefined;
self IPrintLnBold("^6Godmode ^1OFF");
}
}
godmode(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, weapon, vPoint, vDir, sHitLoc, psOffsetTime)
{
self _zm:layer_damage_override(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, weapon, vPoint, vDir, sHitLoc, psOffsetTime);
if (isdefined( eAttacker ) || (IS_TRUE(eAttacker.is_zombie)))
{
iDamage = 0;
}
}
as of right now it just crashes my game. when loading into a map.
help is much appreciated!