Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: UpNorth.se on November 23, 2006, 03:58:21 pm

Title: Anti Spectator Kill Cheat
Post by: UpNorth.se on November 23, 2006, 03:58:21 pm
Script Name: Anti Spectator Kill Cheat
Script Description: Bans people who kills in spectator mode
Original Author: UpNorth.Se
Core Version: 2.5.2

I ran into a german today who apparantly had made a "spectator kill hack".
I saw and experienced it and it worked. My server didn't even react. So I made this
script to prevent that hack. I'm not sure it works since I haven't met someone with
that hack since then but it should though so please let me know. It should ban whoever
kill players when they are spectators. You could also just make spectator mode unavailable
but if you don't want that you can use this script.
I'm new to Pascal by the way and I'm learning it right now. (I chose QBasic over Pascal
when I was young) So if there's something I've done wrong please let me know.

Code: [Select]
//Script made by UpNorth.se

Const
BANTIME = 525600;  //In minutes (This is 1 year, change it to whatever you like.)

var
wID: integer;
wTeam: integer;

function IDtoTeam(PlayerID: integer):integer;
begin
  case PlayerID of
    1: Result:= Player_Team_1;
    2: Result:= Player_Team_2;
    3: Result:= Player_Team_3;
    4: Result:= Player_Team_4;
    5: Result:= Player_Team_5;
    6: Result:= Player_Team_6;
    7: Result:= Player_Team_7;
    8: Result:= Player_Team_8;
    9: Result:= Player_Team_9;
    10: Result:= Player_Team_10;
    11: Result:= Player_Team_11;
    12: Result:= Player_Team_12;
    13: Result:= Player_Team_13;
    14: Result:= Player_Team_14;
    15: Result:= Player_Team_15;
    16: Result:= Player_Team_16;
    17: Result:= Player_Team_17;
    18: Result:= Player_Team_18;
    19: Result:= Player_Team_19;
    20: Result:= Player_Team_20;
    21: Result:= Player_Team_21;
    22: Result:= Player_Team_22;
    23: Result:= Player_Team_23;
    24: Result:= Player_Team_24;
    25: Result:= Player_Team_25;
    26: Result:= Player_Team_26;
    27: Result:= Player_Team_27;
    28: Result:= Player_Team_28;
    29: Result:= Player_Team_29;
    30: Result:= Player_Team_30;
    31: Result:= Player_Team_31;
    32: Result:= Player_Team_32;
  end;
end;


procedure OnPlayerKill(Killer,Victim,Weapon: string);
begin
wID := NametoID(Killer);
wTeam := IDtoTeam(wID);
if wTeam = 5 then begin
BanPlayer(NametoID(Killer),0);  //The '0' makes it permanent, replace it with BANTIME if you like.
end;
end;
Title: Re: Anti Spectator Kill Cheat
Post by: Toumaz on November 23, 2006, 04:05:27 pm
That's a pretty nice script there. Though I have never ran into one of those spectator killers myself, I can understand that it can be quite useful.

Oh, and a little advice: put your code within these two tags:

Code: [Select]
{code}{/code}(replace { and } with [ and ])
Title: Re: Anti Spectator Kill Cheat
Post by: cooz on November 23, 2006, 04:31:53 pm
nice simple script,

oh and one thing, you don't have to use those wID and wTeam variables, just put function call into another function call ;)
Title: Re: Anti Spectator Kill Cheat
Post by: UpNorth.se on November 23, 2006, 04:46:02 pm
That's a pretty nice script there. Though I have never ran into one of those spectator killers myself, I can understand that it can be quite useful.

Oh, and a little advice: put your code within these two tags:

Code: [Select]
{code}{/code}(replace { and } with [ and ])

Ye me neither. I was pretty suprised to be honest.
Have never heard of that hack. He (the german
named ~Elo001~ by the way) said he will not make
it public so I'm not sure if there will be a lot of people
out there with that hack but I guess someone Will make
a public one someday.

nice simple script,

oh and one thing, you don't have to use those wID and wTeam variables, just put function call into another function call ;)

Hehe, ye I know, it's just that I'm used to do it this way when I'm programming/scripting, although it Is unnecessary. :oP
Title: Re: Anti Spectator Kill Cheat
Post by: Timmeh` on December 18, 2006, 04:54:50 pm
Awesome, those spectator killers are so annoying, and they get away with it alot, a vK Public Server admin wouldn't kick this spec killer because he didn't believe it was possible.
Title: Re: Anti Spectator Kill Cheat
Post by: GAMEOVER on December 23, 2006, 12:20:19 pm
Okay cut the crap, how the hell can someone.. anyway plus 10000 karm for anyone making anything to make these idiots hacks harder to use.
Title: Re: Anti Spectator Kill Cheat
Post by: serk1sniper on December 23, 2006, 08:59:40 pm
:D dont ban me, i have made a spec kill hack, XD, never going public
Title: Re: Anti Spectator Kill Cheat
Post by: Clawbug on December 23, 2006, 09:37:20 pm
:D dont ban me, i have made a spec kill hack, XD, never going public
If I was a mod, you would be banned just right now, no matter did you create one or not, or is it going to be public or not. :| No mercy from me for people who do things like that, or those who say they do.
Title: Re: Anti Spectator Kill Cheat
Post by: FliesLikeABrick on December 24, 2006, 01:37:09 am
:D dont ban me, i have made a spec kill hack, XD, never going public

banned.


I did that 4 hours ago ¬_¬ -Ru
Title: Re: Anti Spectator Kill Cheat
Post by: FliesLikeABrick on December 26, 2006, 01:37:57 pm
cant believe that you still remember me
well , guess ill be banned from ***, couse i used this a way to often (sry :/ )
anyway , the script wont work

btw : somebody else made it public
banned http://forums.soldat.pl/index.php?topic=9128.0
Title: Re: Anti Spectator Kill Cheat
Post by: Twistkill on January 21, 2007, 04:42:51 pm
I have seen this hack twice before. The hacking spectator's name was usually "," or ".", an endless amount of knives were being thrown at high speed from out of thin air, and every kill he made on the Kill console was -1.  o_O
Title: Re: Anti Spectator Kill Cheat
Post by: The Owls on January 21, 2007, 10:13:29 pm
I didn't think that this was a hack.  I thought it was just like the team change bug where you get stuck to a person, where 2 people take up one slot.  Except one of them being a spectator.  I've actually had that happen to me before on elite slicers.  If it's not the same thing then it's obviously very similar. 
Title: Re: Anti Spectator Kill Cheat
Post by: chrisgbk on January 21, 2007, 11:15:17 pm
It's a hack; and it's also fixed in the next version of the dedicated server.
Title: Re: Anti Spectator Kill Cheat
Post by: cooz on January 22, 2007, 04:17:48 am
It's a hack; and it's also fixed in the next version of the dedicated server.

till they change some mem addresses, and it'll start again :X
Title: Re: Anti Spectator Kill Cheat
Post by: EnEsCe on January 22, 2007, 04:19:21 am
It's a hack; and it's also fixed in the next version of the dedicated server.
till they change some mem addresses, and it'll start again :X
They can change as many mem addresses as they want, the detection is server-sided and therefore impossible to bypass.
Title: Re: Anti Spectator Kill Cheat
Post by: cooz on January 22, 2007, 04:34:53 am
It's a hack; and it's also fixed in the next version of the dedicated server.
till they change some mem addresses, and it'll start again :X
They can change as many mem addresses as they want, the detection is server-sided and therefore impossible to bypass.
ah right, it's like mass flag protection,
so basically script above hardcoded into server, cool.
Title: Re: Anti Spectator Kill Cheat
Post by: Cube on January 24, 2007, 04:43:06 pm
this is a easy to fix hack i think just like the mass flag aso.

@FLAB: did you really ban him? i dont see that.

@EnEsCe: simple and good idea to make everything server-sided. btw, very LAME question, and future-related: would makeing almost everything serversided cause lag lol? i know, lame question

Date Posted: January 24, 2007, 10:41:18 PM
ah and btw, i know that german too :P