0 Members and 3 Guests are viewing this topic.
function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;beginif Players[Victim].Invincible then Result := -999999999999999999999999999999999999 else Result := Damage;end;
theres no need to add that many 9s, about 4 or 5 will do.
Im not sure why it compiles, but an integer cannot hold that large numbers (OnPlayerDamage returns an integer). Why dont you just set the damage to 0? Or set the player health to 100%?
Quote from: rhide on January 19, 2008, 02:05:47 pmIm not sure why it compiles, but an integer cannot hold that large numbers (OnPlayerDamage returns an integer). Why dont you just set the damage to 0? Or set the player health to 100%?And OBVIOUSLY they do hold integers that high...-.-. duh...
In the scripting engine Integers are 32 bit, meanings they are in the range -2147483648 to 2147483647. The value will wrap around and end up being some number between that, not sure what it would be offhand.
From my understanding and calculation, 16 bit would be from -65535 to 65534, If not close to it
nice script, i like it, much more stable than fistbox, stops arguing amung players, very nice