CurWeapon event will fire on Fire
I have hooked the CurWeapon event like this:
PHP Code:
but the problem is that whenever the player shoots!!! it also prints the message, even in awp zooming. where is the problem? PHP Code:
|
Re: CurWeapon event will fire on Fire
Because it's called in the following moments:
1 - When you get the weapon; 2 - When you switch to another weapon; 3 - When you reload the weapon; 4 - When you use the snipers telescopic sight (scope); 5 - When you shoot the weapon; 6 - And any other case which changes the numeric values of the gun ammunition (clip, backpack ammo)... Use Ham_Item_Deploy instead, it is called only when the player got the weapon: PHP Code:
|
Re: CurWeapon event will fire on Fire
From here:
Quote:
Also useful: https://www.amxmodx.org/api/amxmodx/register_event |
Re: CurWeapon event will fire on Fire
Instead of asking how to fix your problem code, why don't you provide specifically what you are intending to do? We can likely adjust code to make CurWeapon do what you want, but there's possibly a better way, depending on your goal.
|
Re: CurWeapon event will fire on Fire
in the T or CT team, I need to change all player weapons to the admin's one.
for example, If the admin changes to the knife, all players switch to the knife, if he switches to awp, then I give all players awp. |
Re: CurWeapon event will fire on Fire
This will only fire on a true weapon switch, not when a new weapon is picked up or purchased.
Edit: Just realized WATCH_D0GS UNITED posted essentially the same thing. I saw a lot of orange in his post & assumed it was psuedo-code and it was TLDR so I skipped over it. PHP Code:
|
Re: CurWeapon event will fire on Fire
WATCH_D0GS UNITED's code (and whole message) seems like its generated by chatgpt...
|
Re: CurWeapon event will fire on Fire
Quote:
These AI don't know too much of amxmodx in such level. The way we've wrote is to better explain to Cuttlas, just this. |
Re: CurWeapon event will fire on Fire
@WATCH_D0GS_UNITED Thank you bro for your help. I'm creating a plugin and I due to you a lot man.
@Bugsy you too, you saved me a lot of time bro, thanks for your codes and skill. I also due to you bro. |
Re: CurWeapon event will fire on Fire
Quote:
PHP Code:
|
All times are GMT -4. The time now is 04:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.