• Hooks 1/0
    2 replies, posted
Ok so I have a menu that is hooked to the context menu "C by default", and I was wondering if it is possible in anyway to toggle this hook via a Cvar, I don't believe there is a way but hey its worth a shot. The other option I have is to check it in the function the Context hook runs, which I could do easy but how would I default it to the normal context menu when the Cvar equals 0 because currently it just does nothing when its at 0.
Don't put a condition on how the hook is called. Change your code so that it only triggers if the cvar allows it. Unless I misunderstood you?
[QUOTE=Crazy Quebec;21764300]Don't put a condition on how the hook is called. Change your code so that it only triggers if the cvar allows it. Unless I misunderstood you?[/QUOTE] It wasn't triggering the context menu when the cvar was set to Zero before but I fixed it... Since I don't see the use in making another thread, Is it possible to change a weapons spread outside of the weapons actual Lua. So like [lua] wepowner = LocalPlayer() theweapon = wepowner:GetActiveWeapon() theweapon:ShootBullet( damage, num_bullets, 0.01 ) bullet.Num = num_bullets bullet.Damage = damage bullet.Spread = Vector( aimcone, aimcone, 0 )[/lua] Then lessen the bullet.Spread somehow, which I also need help on if this is possible.
Sorry, you need to Log In to post a reply to this thread.