Raised This Month: $ Target: $400
 0% 

CurWeapon Event


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-07-2024 , 10:13   Re: CurWeapon Event
Reply With Quote #5

These are what you have to work with from a conditions perspective in the CurWeapon event.

https://wiki.alliedmods.net/Half-life_1_game_events
Code:
Name: CurWeapon
byte	IsActive
byte	WeaponID
byte	ClipAmmo
You must reference them in the order as listed.
1=IsActive
2=WeaponID
3=ClipAmmo

So the "1=1" you see above means IsActive must be 1 for the event to trigger in your plugin.

Another example using the 2nd argument of WeaponID. With CSW_AK47=28, you could add a condition to make it only fire on the AK47 by adding:
"2=28"

register_event("CurWeapon" , "AK47Only" , "be" , "1=1" , "2=28" );

Or everything except AK47
register_event("CurWeapon" , "AK47Only" , "be" , "1=1" , "2!28" );
__________________

Last edited by Bugsy; 04-07-2024 at 11:03.
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode