Block Duck on rotating entitys
hey,
i don't want players to duck on entitys like func_rotating, func_door_rotating.. i wrote some code which already works but it just blocks your duck if your on the entity, if you jump and duck in jump and land on the entity in duck you won't stand up but still ducking... i tried set_pev(id, pev_bInDuck, 0) or client_cmd(id,"-duck") but you can still duck on these entitys if you duck before in air... heres my code PHP Code:
|
Re: Block Duck on rotating entitys
Try setting pev_buttons with a removed IN_DUCK flag. You could also try hooking FM_CmdStart.
|
Re: Block Duck on rotating entitys
I've already tried setting pev_button with | IN_DUCK but it didn't work
hooking CmdStart ? there must be a cleaner way... the player just has to get up |
Re: Block Duck on rotating entitys
would it not be better to hook FM_Touch and check if its a "rotating"
|
Re: Block Duck on rotating entitys
Quote:
Try hooking Ham_Player_Duck and setting pev_oldbuttons in that. I don't know if that will work, but if not, try setting pev_buttons in that forward too. |
Re: Block Duck on rotating entitys
Quote:
If your server is on linux you could try orpheu module and try to call PM_Unduck. |
Re: Block Duck on rotating entitys
Hmmm just a quick idea , i can't test anything now
how about doaing a traceline to the bottom in PreThink so i can get when the player is in air just above the func_rotating (pev_groundentity only changes when you touch the ent first) and you force the player to unduck in the air? aka setting bInDuck or sending -duck, buttons and stop all duck commands from then on |
Re: Block Duck on rotating entitys
Quote:
So i thought it would be easier to hook touch, check if its a rotating and do a client_cmd(id, "wait;-duck") or some shit |
Re: Block Duck on rotating entitys
Quote:
Quote:
PHP Code:
|
Re: Block Duck on rotating entitys
Oh wow it works now :)
Thanks to minimiller for client_cmd("WAIT;-duck") .. The wait was the thing i forgot , now it works properly PHP Code:
i tried making an if statement checking bInDuck, PhysicsFlags, fDuckTime and some other shit but it didn't work ... Is this bad if it spams -duck so often? |
| All times are GMT -4. The time now is 17:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.