Knife Question
How would you force someone to use the KNIFE ONLY without stripping there weapons?
|
Re: Knife Question
1.
Code:
engclient_cmd(id, "weapon_knife"); |
Re: Knife Question
Does it matter if I use it in one rather than the other?
|
Re: Knife Question
Don't think so...all you must to do is to check if weapon != CSW_KNIFE and do that cmd! :)
|
Re: Knife Question
Okay thanks Alka. :)
|
Re: Knife Question
It'd be better in CurWeapon.
|
Re: Knife Question
Alka, that has to be the most inefficient way to do that...Executing a command like that every prethink?
Execute the command once, then alter the pev_weapons bitmask to be ONLY the knife, which would be something like set_pev(id,pev_weapons,CSW_KNIFE); To safeguard from some workarounds (I think lastinv might be one of them), also hook CurWeapon and test which weapon it is being changed to - if it's not the knife, execute weapon_knife again. |
Re: Knife Question
Whoa lol, i've sayd about CurWeapon too, and how Zenith77 say's the efficient way is CurWeapon, check if weapon read_data(2) != CSW_KNIFE! :/
|
Re: Knife Question
Because you said CurWeapon OR client prethink.
You can register the event with "2!29" so the event will be called only if player weapon is not a knife. |
Re: Knife Question
I'm using prethink, although if that method isn't "good" i'll use curweapon.
|
| All times are GMT -4. The time now is 16:04. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.