Author Topic: Admin Invisibility 2.2 Final  (Read 6576 times)

0 Members and 1 Guest are viewing this topic.

Offline Gnintendo

  • Major
  • *
  • Posts: 61
Admin Invisibility 2.2 Final
« on: December 19, 2007, 07:18:17 pm »
Script Name: Admin Invisibility 2.2 Final
Script Description: Admin command that gives yourself Invisibility by typing /invis and gets rid of it by typing /invis again.¬  You can also give other people Invisibility with /invis <ID>, again just repeat that to take away somebody's Invisibility.
Original Author(s): Gnintendo, thanks to curt for helping me with 1.0.¬  Special thanks to Kavukamari.
Core Version: 2.6.3
Code Snippet:
Code: [Select]
    If GetPlayerStat(Target,'Team') <> 5 Then Begin
    If GetPlayerStat(Target, 'Active') = True Then Begin
    If Players[Target].Invisible Then Begin
      Players[Target].Invisible := False
      WriteConsole(Target, GetPlayerStat(Target, 'Name') + '''s Invisibility has been disabled.', $FFFF0000);
      if (Target <> ID) then WriteConsole(ID, GetPlayerStat(Target, 'Name') + '''s Invisibility has been disabled.', $FFFF0000);
      Players[Target].InvisibleCounter := 0;
    End Else Begin
      Players[Target].Invisible := True
      WriteConsole(Target, GetPlayerStat(Target, 'Name') + ' has been given Invisibility.', $FF43DF02);
      if (Target <> ID) then WriteConsole(ID, GetPlayerStat(Target, 'Name') + ' has been given Invisibility.', $FF43DF02);
     GiveBonus(Target, 1);
     DrawText(Target, '  ', 1, $00000000, 1, 0, 0);
     Players[Target].InvisibleCounter := InitialInvisibleCounter;
    End;   
  End;
End;
End;
End;
« Last Edit: January 14, 2008, 04:24:48 pm by Gnintendo »

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Admin Invisibility
« Reply #1 on: December 19, 2007, 08:03:33 pm »
You should also have it give invisibility to the players with invis when they first respawn.

Offline Gnintendo

  • Major
  • *
  • Posts: 61
Re: Admin Invisibility
« Reply #2 on: December 19, 2007, 09:07:08 pm »
You should also have it give invisibility to the players with invis when they first respawn.
Good idea, I guess I'll add that later when I have some extra time.  Maybe tomorrow afternoon I'll make a 1.1 version of the code including that.

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: Admin Invisibility
« Reply #3 on: December 19, 2007, 09:17:59 pm »
add this in there, so the invisibility lasts

Code: [Select]
procedure AppOnIdle(Ticks: integer);
var
  Time: array[1..32] of integer;
  i: integer;
begin
  for i:=1 to 32 do begin
    if not Invisible[i] then continue else begin
      if Time[i] = 0 then begin
        GiveBonus(i,1);
        Time[i]:=20;
      end else if Time[i] > 0 then Time[i]:=Time[i]-1;
    end;
  end;
end;

I think the code is valid...
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."

Offline Gnintendo

  • Major
  • *
  • Posts: 61
Re: Admin Invisibility
« Reply #4 on: December 23, 2007, 07:14:24 am »
add this in there, so the invisibility lasts

Code: [Select]
procedure AppOnIdle(Ticks: integer);
var
 Time: array[1..32] of integer;
 i: integer;
begin
 for i:=1 to 32 do begin
 if not Invisible[i] then continue else begin
 if Time[i] = 0 then begin
 GiveBonus(i,1);
 Time[i]:=20;
 end else if Time[i] > 0 then Time[i]:=Time[i]-1;
 end;
 end;
end;

I think the code is valid...
Wow, I'm disapointed in you.  You just assumed I'm too stupid to add that, it was already there.  That proves you didn't even check to see if I had it, you just assumed I was too stupid.

Date Posted: December 19, 2007, 09:52:54 pm
Ok, the next version (1.1) is finished, I'm just doing some testing to make sure there aren't any bugs.  I'll post it as soon as I'm SURE it's good.

Offline pinOi32

  • Camper
  • ***
  • Posts: 339
  • "Bravo kid's bad day"
    • Newgrounds
Re: Admin Invisibility
« Reply #5 on: December 24, 2007, 03:13:59 pm »
how come when I try to use this on my server, it says something about "out of range"?
Pls use my amazing interface:
http://forums.soldat.pl/index.php?topic=27584


I WIN!!

WHY MY KARMA SUCK??

Offline Gnintendo

  • Major
  • *
  • Posts: 61
Re: Admin Invisibility 2.1 Final
« Reply #6 on: January 13, 2008, 04:11:32 pm »
how come when I try to use this on my server, it says something about "out of range"?
Another code must be interfering, the text out of range isn't even in my code anywhere.  Your server must have some other problem or you posted thinking you downloaded something you didn't.

Date Posted: December 24, 2007, 03:51:18 pm
I have released version 1.1 with a lot of changes all for the better.  I hope you download it :D.

Please tell me what you think :D.

Date Posted: December 25, 2007, 07:38:29 am
Edited, I made a major modification that lets you give Invisibility to other players and take it from them if you want.

Date Posted: January 13, 2008, 09:32:16 am
2.1 Final released...have fun....

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Admin Invisibility 2.1 Final
« Reply #7 on: January 13, 2008, 06:25:49 pm »
You should check if GetPlayerStat(Id, 'Active') = true having /invis <id> cmd's action done
Another small thing, when im in spec and i do "/invis 1", predator shading and stuff comes up, shouldn't have it give when spec
Other than that, gj

Offline Gnintendo

  • Major
  • *
  • Posts: 61
Re: Admin Invisibility 2.1 Final
« Reply #8 on: January 13, 2008, 07:34:50 pm »
You should check if GetPlayerStat(Id, 'Active') = true having /invis <id> cmd's action done
Another small thing, when im in spec and i do "/invis 1", predator shading and stuff comes up, shouldn't have it give when spec
Other than that, gj
The getplayerstat line IS in there...because it says they aren't active...same thing pretty much...actualy more of an add on...I might have removed the line let me double check right now...
nope, it's there here's a quote straight from the script:
Code: [Select]
    If GetPlayerStat(Target, 'Active') = False Then Begin
      WriteConsole(ID, 'Can not find that player', $FFFF0000);
    End;
Also, I forgot about the spectator thing...it's not big deal though really makes no difference, they can undo it and it goes away when they leave...I might add it later...a.k.a. it's on my do before I die list.

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: Admin Invisibility 2.1 Final
« Reply #9 on: January 13, 2008, 08:40:16 pm »
add this in there, so the invisibility lasts

Code: [Select]
procedure AppOnIdle(Ticks: integer);
var
 Time: array[1..32] of integer;
 i: integer;
begin
 for i:=1 to 32 do begin
 if not Invisible[i] then continue else begin
 if Time[i] = 0 then begin
 GiveBonus(i,1);
 Time[i]:=20;
 end else if Time[i] > 0 then Time[i]:=Time[i]-1;
 end;
 end;
end;

I think the code is valid...
Wow, I'm disapointed in you. You just assumed I'm too stupid to add that, it was already there. That proves you didn't even check to see if I had it, you just assumed I was too stupid.

Date Posted: December 19, 2007, 09:52:54 pm
Ok, the next version (1.1) is finished, I'm just doing some testing to make sure there aren't any bugs. I'll post it as soon as I'm SURE it's good.

I didnt assume you were stupid, I was just too lazy to check the script
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Admin Invisibility 2.1 Final
« Reply #10 on: January 14, 2008, 06:25:55 am »
You should check if GetPlayerStat(Id, 'Active') = true having /invis <id> cmd's action done
Another small thing, when im in spec and i do "/invis 1", predator shading and stuff comes up, shouldn't have it give when spec
Other than that, gj
The getplayerstat line IS in there...because it says they aren't active...same thing pretty much...actualy more of an add on...I might have removed the line let me double check right now...
Sry, missed the message saying that it could not find the player, but it still seems to say "  has been given Invisibility." message, so i didn't see the message saying player wasn't found at first :)
Code: [Select]
    If GetPlayerStat(Target, 'Active') = False Then Begin
      WriteConsole(ID, 'Can not find that player', $FFFF0000);
    End else Begin
      //...
    End;
instead of what it currently is, says the message b4 adding invis.

Offline Gnintendo

  • Major
  • *
  • Posts: 61
Re: Admin Invisibility 2.2 Final
« Reply #11 on: February 05, 2008, 09:44:32 pm »
You should check if GetPlayerStat(Id, 'Active') = true having /invis <id> cmd's action done
Another small thing, when im in spec and i do "/invis 1", predator shading and stuff comes up, shouldn't have it give when spec
Other than that, gj
The getplayerstat line IS in there...because it says they aren't active...same thing pretty much...actualy more of an add on...I might have removed the line let me double check right now...
Sry, missed the message saying that it could not find the player, but it still seems to say " has been given Invisibility." message, so i didn't see the message saying player wasn't found at first :)
Code: [Select]
If GetPlayerStat(Target, 'Active') = False Then Begin
 WriteConsole(ID, 'Can not find that player', $FFFF0000);
 End else Begin
 //...
 End;
instead of what it currently is, says the message b4 adding invis.
I figured out what you meant before that, I was too lazy to edit my post.  xD....I'll fix it later today.

Date Posted: January 14, 2008, 07:19:14 am
2.2 Final released, fixed all possible Spectator/non-existing player bugs.  Enjoy.

Date Posted: January 14, 2008, 04:20:31 pm
I noticed some people on some servers like to use this code to give everybody invisibility and play that way, doing this is very inconvenient.  I guess what I'm trying to say is I'll probably code a new version of this script that has two new commands /invisallon and /invisalloff.

/invisallon will give everybody invisibility even if people leave and even the people that join.

/invisalloff will turn off this mode where everybody has invisibility

there will also be an extra caution put in place where if the admin that turned the /invisallon mode on leaves the game, it automatically goes back to regular mode, that way you can't accidentally leave your server and everybody have invisibility.

Ok if you think it's a good idea say so...

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Admin Invisibility 2.2 Final
« Reply #12 on: May 06, 2008, 02:02:09 am »
i love it, its great, i love it, it may come in handy
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline utkesmer

  • Major(1)
  • Posts: 44
Re: Admin Invisibility 2.2 Final
« Reply #13 on: January 30, 2009, 09:06:51 am »
its great but i think when i /invis 1 again, i must be uninvisible at this moment.

but i wait 15 sec. to be uninvisible.

sorry for my english:D [uninvisible, ...]

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Admin Invisibility 2.2 Final
« Reply #14 on: January 30, 2009, 10:22:46 am »
It's impossible to stop predator via script, but you can always kill yourself to become visible.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Admin Invisibility 2.2 Final
« Reply #15 on: January 30, 2009, 03:56:26 pm »
It's impossible to stop predator via script, but you can always kill yourself to become visible.
possibly may be a way to kill yourself, but respawn instantly? or if not, whatever.. moveplayer back to previous location when died. some sort of work-around but just thinking it through i don't think a very smooth one can be made.

Offline Mr

  • Inactive Soldat Developer
  • Soldier
  • ******
  • Posts: 166
Re: Admin Invisibility 2.2 Final
« Reply #16 on: January 30, 2009, 04:37:21 pm »
you could save the player's coords, then move him out of the map so he'll respawn (and won't get a death), then move him back. takes about half a second.

Offline JFK

  • Camper
  • ***
  • Posts: 255
    • My TraxInSpace Account
Re: Admin Invisibility 2.2 Final
« Reply #17 on: January 30, 2009, 04:38:06 pm »
/setteam will respawn you instantly, if needed twice. It can be smooth enough...
Come join: EliteCTF
Listen to: My Music

Offline Gnintendo

  • Major
  • *
  • Posts: 61
Re: Admin Invisibility 2.2 Final
« Reply #18 on: February 14, 2009, 11:17:03 am »
Interesting ideas...I'll have to try some of them when I have time later.

While you can teleport back to where you were, you lose all of your momentum and it still takes time...
« Last Edit: February 15, 2009, 03:05:05 pm by Gnintendo »