Liberty Unleashed

Scripting => Script Snippets => Topic started by: xMerkel on September 14, 2014, 03:05:50 am

Title: Detect if is using trainer/hax
Post by: xMerkel 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
}
}
Title: Re: Detect if is using trainer/hax
Post by: Thijn 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.