Liberty Unleashed
Scripting => Script Snippets => Topic started 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)
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
}
}
-
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.