Raised This Month: $135 Target: $400
 33% 

Free ammo


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
asstolavista
Junior Member
Join Date: Jan 2007
Old 02-01-2007 , 20:40   Free ammo
Reply With Quote #1

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
Attached Files
File Type: sma Get Plugin or Get Source (freeammo.sma - 13192 views - 8.0 KB)

Last edited by asstolavista; 02-08-2007 at 20:22. Reason: version 1.4
asstolavista is offline
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 02-02-2007 , 00:02   Re: Free ammo
Reply With Quote #2

Sweet, looks pretty well done.
I do remember liking that feature in CS:S, you just spawn and your on your way.
__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."

Last edited by soccdoodcss; 02-02-2007 at 00:04.
soccdoodcss is offline
Send a message via AIM to soccdoodcss
VEN
Veteran Member
Join Date: Jan 2005
Old 02-02-2007 , 05:16   Re: Free ammo
Reply With Quote #3

This will not work for buying through old-style buy menu.
VEN is offline
Morpheus759
BANNED
Join Date: Feb 2007
Location: Poland
Old 02-05-2007 , 10:43   Re: Free ammo
Reply With Quote #4

Quote:
Modification: ALL Category: Admin Commands
Really??
Morpheus759 is offline
asstolavista
Junior Member
Join Date: Jan 2007
Old 02-05-2007 , 11:48   Re: Free ammo
Reply With Quote #5

Quote:
Originally Posted by VEN View Post
This will not work for buying through old-style buy menu.
So for old-style menu I must keep track of the selections the player makes? Or is there a simplier way?

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.
asstolavista is offline
asstolavista
Junior Member
Join Date: Jan 2007
Old 02-05-2007 , 11:49   Re: Free ammo
Reply With Quote #6

Quote:
Originally Posted by Morpheus759 View Post
Really??
I am absolutely sure I didn't choose "admin commands" but "gameplay", although I might have not chosen Counter-Strike as the mod, I didn't see it.
asstolavista is offline
1NiteStand
Junior Member
Join Date: Feb 2007
Old 02-05-2007 , 20:00   Re: Free ammo
Reply With Quote #7

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!
__________________
Why do you ask? CAUSE IT'S BALLIN BITCH BALLIN!

+KaRma Me?
1NiteStand is offline
asstolavista
Junior Member
Join Date: Jan 2007
Old 02-06-2007 , 19:28   Re: Free ammo
Reply With Quote #8

Quote:
Originally Posted by asstolavista View Post
So for old-style menu I must keep track of the selections the player makes? Or is there a simplier way?

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.
Please tell me something. I'll try the first way, tracking user menus and choices, but I don't know if that is correct or not.

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.
asstolavista is offline
asstolavista
Junior Member
Join Date: Jan 2007
Old 02-07-2007 , 00:21   Re: Free ammo
Reply With Quote #9

Ok, I think I did it, just up'd version 1.1, please test it.
asstolavista is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 02-08-2007 , 10:01   Re: Free ammo
Reply With Quote #10

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.

Last edited by VEN; 02-08-2007 at 10:30.
VEN is offline
Reply


Thread Tools
Display Modes

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 17:30.


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