Код:
//Custom knife models//
UI.AddCheckbox("Team based knife")
UI.AddDropdown('CT knife model', ['None', 'Bayonet', 'Flip knife', 'Gut knife', 'Karambit', 'M9 bayonet', 'Butterfly', 'Falchion', 'Navaja', 'Shadow daggers', 'Stiletto', 'Bowie', 'Huntsman', 'Talon', 'Ursus', 'Classic', 'Paracord', 'Survival', 'Nomad', 'Skeleton']);
UI.AddDropdown('T knife model', ['None', 'Bayonet', 'Flip knife', 'Gut knife', 'Karambit', 'M9 bayonet', 'Butterfly', 'Falchion', 'Navaja', 'Shadow daggers', 'Stiletto', 'Bowie', 'Huntsman', 'Talon', 'Ursus', 'Classic', 'Paracord', 'Survival', 'Nomad', 'Skeleton']);
function onknife(){
if(Cheat.FrameStage() != 2)
return
var team = Entity.GetProp(Entity.GetLocalPlayer(),"DT_BaseEntity", "m_iTeamNum")
if(!UI.GetValue("Script Items", "Team based knife")){
UI.SetEnabled("Script Items", "CT knife model", false)
UI.SetEnabled("Script Items", "T knife model", false)
return;
}
UI.SetEnabled("Script Items", "T knife model", true)
UI.SetEnabled("Script Items", "CT knife model", true)
if(team == 2){ // T
UI.SetValue("Misc", "SKINS", "Knife", "Knife model", UI.GetValue("Script Items", "T knife model"))
}
else if(team == 3){ // CT
UI.SetValue("Misc", "SKINS", "Knife", "Knife model", UI.GetValue("Script Items", "CT knife model"))
}
}
Cheat.RegisterCallback("FrameStageNotify","onknife")