Author Topic: Detect if is using trainer/hax  (Read 2321 times)

xMerkel

  • Newbie
  • *
  • Posts: 34
  • Karma: +1/-12
  • Cpp
    • View Profile
Detect if is using trainer/hax
« on: September 14, 2014, 03:05:50 am »
This code was tested with Cheat Engine freezing the value, not tested with trainers (bcs for me not works ;c)

Code: [Select]
HP <- 0;

Local <- FindLocalPlayer ( );

function onClientShot ( pPlayer, Weapon, Part ) {

local Set = false;

if ( HP != Local.Health ) {

HP = Local.Health;

Set = true;
}

if ( HP == Local.Health && Set == false ) {

Message ( "Trainer! ;c" );

Local.Health = 0; // Kill or something
}
}

Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: Detect if is using trainer/hax
« Reply #1 on: September 14, 2014, 12:10:20 pm »
I don't know if this will work with a freezed health value, but if you set the health to 1 instead of 0 then the player who last shot him will get the kill. Instead of him committing suicide.

 

© Liberty Unleashed Team.