Free ammo
1 Attachment(s)
This plugin gives Counter-Strike 1.6 players free full ammo for their weapons (primary and secondary) like Counter-Strike Source: on spawn, on buy and on new round. I used VEN's suggested events for new round and spawn.
Cvars: - fa_enable, 1 to enable plugin (default is 1) - fa_altclips, 1 to enable alternative method of filling backpack ammo by giving clips, for older versions of CS (default is 0) Version 1.4 - New method for buy event, should be more general and reliable (I think) Version 1.3 - Fixed ammo icon not showing with alternative method - Fixed grenade ammo icon showing twice Version 1.2 - Added ammo pickup icon on first spawn and on buy like CSS (alternative method still always shows max ammo instead of given ammo) - Fixed misbehaviour on rare situation (must be exploited: disconnect with old-style menu open, reconnect on same slot and cmd menuselect) - Fixed giving ammo outside buyzone Version 1.1 - Added old-style menu support - Added fa_enable and fa_altclips cvars Version 1.0 - Initial version |
Re: Free ammo
Sweet, looks pretty well done.
I do remember liking that feature in CS:S, you just spawn and your on your way. |
Re: Free ammo
This will not work for buying through old-style buy menu.
|
Re: Free ammo
Quote:
|
Re: Free ammo
Quote:
A more general way I see is relating the weapon pickup event message with the money event message, but I don't know how to do that effectively. |
Re: Free ammo
Quote:
|
Re: Free ammo
i dont noe bout u guys but this is a pretty sweet plugin, i dont get y noe one thought of this before :] RAD PLUGIN!
|
Re: Free ammo
Quote:
As for the second way, I would have to catch all events to be sure there is nothing between weapon pickup and money event to make sure the weapon was bought, and I'm not going to do that unless someone more experient tells me that's ok (especially in terms of performance) and actually shows me how to catch all events. I'm thinking of a register_message cycle, but where can I get the minimum and maximum values for it? I can peek the .inc's and make it hardcoded, but you'd have to tell me that's ok as well. |
Re: Free ammo
Ok, I think I did it, just up'd version 1.1, please test it.
|
Re: Free ammo
Hints: find_ent_by_owner, string is empty if !string[0], string[0] = 0 or string[0] = '^0' to empty string.
You should understand that command execution or menu keypress doesn't necessarily mean that buying will be performed. Therefore your plugin is incompatible with the AMX Mod X Restrict Weapons Plugin, plus, there is an issue with overriding old-style buy menu by other AMX Mod X registered menu. As for your second idea i'd register FM_MessageBegin (see fakemeta.inc and fakemeta_const.inc). Also there is a simple method of WeapPickup/Money messages gametime check, though the second way would be more accurate. |
All times are GMT -4. The time now is 06:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.