0 Members and 3 Guests are viewing this topic.
  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;
You should also have it give invisibility to the players with invis when they first respawn.
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;
add this in there, so the invisibility lastsCode: [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...
how come when I try to use this on my server, it says something about "out of range"?
You should check if GetPlayerStat(Id, 'Active') = true having /invis <id> cmd's action doneAnother small thing, when im in spec and i do "/invis 1", predator shading and stuff comes up, shouldn't have it give when specOther than that, gj
If GetPlayerStat(Target, 'Active') = False Then Begin WriteConsole(ID, 'Can not find that player', $FFFF0000); End;
Quote from: Kavukamari on December 19, 2007, 09:17:59 pmadd this in there, so the invisibility lastsCode: [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 pmOk, 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.
Quote from: DorkeyDear on January 13, 2008, 06:25:49 pmYou should check if GetPlayerStat(Id, 'Active') = true having /invis <id> cmd's action doneAnother small thing, when im in spec and i do "/invis 1", predator shading and stuff comes up, shouldn't have it give when specOther than that, gjThe 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...
If GetPlayerStat(Target, 'Active') = False Then Begin WriteConsole(ID, 'Can not find that player', $FFFF0000); End else Begin //... End;
Quote from: Gnintendo on January 13, 2008, 07:34:50 pmQuote from: DorkeyDear on January 13, 2008, 06:25:49 pmYou should check if GetPlayerStat(Id, 'Active') = true having /invis <id> cmd's action doneAnother small thing, when im in spec and i do "/invis 1", predator shading and stuff comes up, shouldn't have it give when specOther than that, gjThe 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.
It's impossible to stop predator via script, but you can always kill yourself to become visible.