Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: Gnintendo on January 16, 2008, 05:54:26 pm

Title: Admin Invincibility
Post 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:
Code: [Select]
function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;
begin
if Players[Victim].Invincible then Result := -999999999999999999999999999999999999 else Result := Damage;
end;
Title: Re: Admin Invincibility
Post by: Iq Unlimited on January 16, 2008, 06:06:32 pm
theres no need to add that many 9s, about 4 or 5 will do.
Title: Re: Admin Invincibility
Post by: Gnintendo on January 16, 2008, 06:06:51 pm
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.)
Title: Re: Admin Invincibility
Post by: Hershey on January 16, 2008, 06:38:02 pm
pretty good, i like it
Title: Re: Admin Invincibility
Post by: rhide on January 19, 2008, 02:05:47 pm
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%?
Title: Re: Admin Invincibility
Post by: Iq Unlimited on January 19, 2008, 02:06:53 pm
Explosions still kill if the damage is set to 0 or you set the players hp to 100%.
Title: Re: Admin Invincibility
Post by: Gnintendo on January 19, 2008, 05:54:11 pm
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...
Title: Re: Admin Invincibility
Post by: Snake on January 19, 2008, 06:45:37 pm
nice cool I like it
Title: Re: Admin Invincibility
Post by: rhide on January 23, 2008, 06:05:55 pm
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.
Title: Re: Admin Invincibility
Post by: DorkeyDear on January 24, 2008, 06:29:30 am
integers are -32768 to 32767 so the actual number is somewhere between those.
Title: Re: Admin Invincibility
Post by: chrisgbk on January 24, 2008, 07:58:14 am
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.
Title: Re: Admin Invincibility
Post by: DorkeyDear on January 25, 2008, 06:35:55 am
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)?
Title: Re: Admin Invincibility
Post by: chutem on January 25, 2008, 06:34:35 pm
From my understanding and calculation, 16 bit would be from -65535 to 65534, If not close to it
Title: Re: Admin Invincibility
Post by: DorkeyDear on January 25, 2008, 07:24:58 pm
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?
Title: Re: Admin Invincibility
Post by: chutem on January 25, 2008, 07:38:45 pm
If you mean as in longint, shortint, then it would be a 'word', that actually goes from 0 to 65535
Title: Re: Admin Invincibility
Post by: Gnintendo on January 25, 2008, 09:19:07 pm
Why the hell are we arguing about this anyway, all that matters is the code works...
Title: Re: Admin Invincibility
Post by: chutem on January 25, 2008, 09:45:42 pm
Who's arguing?
Title: Re: Admin Invincibility
Post by: 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
Title: Re: Admin Invincibility
Post by: Gnintendo on October 03, 2008, 03:22:45 pm
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.
Title: Re: Admin Invincibility
Post by: Norbo on October 03, 2008, 03:57:09 pm
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
Title: Re: Admin Invincibility
Post by: Gnintendo on October 03, 2008, 06:22:04 pm
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.
Title: Re: Admin Invincibility
Post by: frosty on December 17, 2008, 01:03:45 am
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
Title: Re: Admin Invincibility
Post by: SpiltCoffee on December 17, 2008, 09:30:18 am
Yet another admin invincibility script. Yahoo.

*yawns*

lol
Title: Re: Admin Invincibility
Post by: rumpel on December 17, 2008, 09:37:43 am
yet another not on date looker

*yawns*
Title: Re: Admin Invincibility
Post by: frosty on December 17, 2008, 07:18:57 pm
yet another bump

*y......LOL