Official Soldat Forums
Server Talk => Scripting Releases => Topic started by: Gnintendo on January 16, 2008, 05:54:26 pm
-
Script Name: Admin Invincibility
Script Description: Use /invin to give yourself Invincibility and type /invin again to get rid of it. You can also use /invin <ID> to give it to other people (or take it from them.)
Original Author(s): Gnintendo
Core Version: 2.6.3
Code Snippet:
function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;
begin
if Players[Victim].Invincible then Result := -999999999999999999999999999999999999 else Result := Damage;
end;
-
theres no need to add that many 9s, about 4 or 5 will do.
-
theres no need to add that many 9s, about 4 or 5 will do.
I know...I was having fun with it xD.
(Besides there are some modded attacks on some servers that do insane damage...so just to be safe anyway.)
-
pretty good, i like it
-
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%?
-
Explosions still kill if the damage is set to 0 or you set the players hp to 100%.
-
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%?
And OBVIOUSLY they do hold integers that high...-.-. duh...
-
nice cool I like it
-
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%?
And OBVIOUSLY they do hold integers that high...-.-. duh...
No. Integers, depending on the computer, are often 16 bit - that is - at most 65 536. I belive that the compiler either sets it to the largest negative number a integer can hold, or perhaps it wraps around a huge amount of times... At least the actual value returnes will NOT be the one you entered.
-
integers are -32768 to 32767 so the actual number is somewhere between those.
-
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.
-
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.
Hm, makes me curious about other things I google being wrong for this scripting engine..
So what would be an 16 bit integer (signed and/or unsigned)?
-
From my understanding and calculation, 16 bit would be from -65535 to 65534, If not close to it
-
From my understanding and calculation, 16 bit would be from -65535 to 65534, If not close to it
I meant what would the datatype be?
-
If you mean as in longint, shortint, then it would be a 'word', that actually goes from 0 to 65535
-
Why the hell are we
arguing about this anyway, all that matters is the code works...
-
Who's arguing?
-
nice script, i like it, much more stable than fistbox, stops arguing amung players, very nice
-
I recently became aware that on climb servers Incremental Damage Polys could still kill you for some reason, I've edited the script and am doing final testing.
As soon as I am sure this works I will upload a new version.
Please keep in mind this probably doesn't affect 99% of you.
-
nice script, i like it, much more stable than fistbox, stops arguing amung players, very nice
er what? what does it have to do with fistbox anyways? and how does it stop arguing amung players? lololol
about the script, pretty nice :P
-
nice script, i like it, much more stable than fistbox, stops arguing amung players, very nice
er what? what does it have to do with fistbox anyways? and how does it stop arguing amung players? lololol
about the script, pretty nice :P
You can use Fistbox to spawn yourself flamegod or something and nobody knows you got it because it doesn't say "BLAHBLAH HAS BEEN GIVEN GODMODE!!" to everybody, only you see the message.
-
Quote from: Norbo on October 03, 2008, 03:57:09 pm
Quote from: frosty on May 03, 2008, 12:01:46 am
nice script, i like it, much more stable than fistbox, stops arguing amung players, very nice
er what? what does it have to do with fistbox anyways? and how does it stop arguing amung players? lololol
[/quote]
rofl wrong thread
-
Yet another admin invincibility script. Yahoo.
*yawns*
lol
-
yet another not on date looker
*yawns*
-
yet another bump
*y......LOL