Dissable shooting when in duck
Hello, I have a problem with a plugin, I need to make that when somebody is in duck he cant shoot, Id like to do it like when you duck your gun dissappears but when you stand it appears again... is something like that possible?
|
Re: Dissable shooting when in duck
I think it would be better to just block the weapon from firing instead of removing it
look up the longjump plugin, you have to duck + move forward + jump to longjump so you will find a way to hook ducking in there after you're done, read this to block the weapon from shooting https://forums.alliedmods.net/showthread.php?t=41265 |
Re: Dissable shooting when in duck
I need that for the call of duty mod server, but only for 1 class. That class has special ability that when duck then the class is invisible, but I need you can't shoot.
case Poltergeist: { niewidzialnosc_kucanie[id] = 1; ilosc_min_player[id] = 0; ilosc_rakiet_player[id] = 0; ilosc_dynamitow_player[id] = 0; if(information_item_player[id][0] != 6){ set_user_rendering(id,kRenderFxNone,255,255,2 55,kRenderTransAlpha,255) } } I need to add some lines to block shooting only for this class |
Re: Dissable shooting when in duck
set player's m_flNextAttack = get_gametime() + 0.1 in PlayerPreThink when player is in duck
|
Re: Dissable shooting when in duck
Code:
|
Re: Dissable shooting when in duck
Quote:
|
Re: Dissable shooting when in duck
Using (and superceding) Ham_Weapon_PrimaryAttack with similar code will probably be more efficient, and also allow you to more easily display the info message.
|
Re: Dissable shooting when in duck
may you edit the code for me please? :) it would be nice from you mate
|
Re: Dissable shooting when in duck
Quote:
If the case were PrimaryAttack, setting PrimaryAttack offset up to 1-2 seconds would break the idea, since you'll lose seconds standing up, and that means, 0.1 seconds delay -> many forward calls anyway |
| All times are GMT -4. The time now is 18:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.