UI.AddCheckbox("Disable player on grenade")
UI.AddSliderInt
function disable()
{
var g_Local = Entity.GetLocalPlayer( );
var g_Local_weapon = Entity.GetWeapon(g_Local);
var weapon_name = Entity.GetName(g_Local_weapon);
var g_Local_classname = Entity.GetClassName( g_Local_weapon );
if (UI.GetValue( "Misc", "JAVASCRIPT", "Script items", "Disable player on grenade") && ( g_Local_classname == "CHEGrenade" || g_Local_classname == "CMolotovGrenade" || g_Local_classname == "CIncendiaryGrenade" || g_Local_classname == "CFlashbang" || g_Local_classname == "CSmokeGrenade" || g_Local_classname == "CDecoyGrenade" ))
{
UI.SetValue("Visual", "SELF", "Chams", "Visible override", true )
UI.SetValue("Visual", "SELF", "Chams", "Visible transparency", "99")
}
else
{
UI.SetValue("Visual", "SELF", "Chams", "Visible override", false )
UI.SetValue("Visual", "SELF", "Chams", "Visible transparency", "0")
}
}
Cheat.RegisterCallback("Draw","disable")