Vice City: Multiplayer

Server Development => Scripting and Server Management => Script Showroom => Topic started by: (vG)DesTroYeR^ on Sep 26, 2025, 05:33 PM

Title: Next-Level Anti-Death Evasion (by =TDAt=Zer0Skills)
Post by: (vG)DesTroYeR^ on Sep 26, 2025, 05:33 PM


Key_WIN <- BindKey(true, 0x5B, 0, 0); // Better add this at onScriptLoad();
Evaders <- [];
function onKeyDown(player, key) {

if(key == Key_WIN){
if(player.Action == 42 || player.Action == 43 || player.Action == 54){
Evaders.append(player.UID);
Message("[#FFF000]"+player.Name+" [#FF0000]has been banned for [#FFA540]Death evasion");
player.Kick();
}
}


function onPlayerPart(player, reason){
if(player.Action == 42 || player.Action == 43 || player.Action == 54){
Message("[#FFF000]"+player.Name+" [#FF0000]has been banned for [#FFA540]Death evasion");
Evaders.append(player.UID);
}
}


function onPlayerJoin(player){
foreach(val in Evaders) {
if(val == player.UID) player.Kick();
}
else return;
/*
OR YOU CAN TRY THIS
if(Evaders.find(player.UID) != null) player.Kick();
I guess this is better than 1st method
*/
}



The idea is that KeyBind is WAY faster than player.Away (built-in), so player.Away might take upto 3 seconds to detect an AFK state
Title: Re: Next-Level Anti-Death Evasion (by =TDAt=Zer0Skills)
Post by: PLAYER on Sep 28, 2025, 03:20 AM
Appreciate it  8)
Title: Re: Next-Level Anti-Death Evasion (by =TDAt=Zer0Skills)
Post by: KazamaOp on Oct 04, 2025, 06:24 PM
Nice
Title: Re: Next-Level Anti-Death Evasion (by =TDAt=Zer0Skills)
Post by: (vG)DesTroYeR^ on Oct 18, 2025, 09:48 PM
Code modified(Updated): Replaced stats AFK/Knocked with player.Action directly