PDA

View Full Version : DoD AmmoGiver ( v1.0 )


Firestorm
12-19-2006, 02:37 PM
// In-Game:
// ========
//
// amx_ammogiver <1/0> = enable/disable DoD AmmoGiver
// (admin command)
//
// say /giveammo = get specified amount of ammo
// for weapon in hand
//
// say giveammo = get specified amount of ammo
// for weapon in hand
//
//
// CVARs (for amxx.cfg):
// =====================
//
// dod_ammogiver 1 = enable DoD AmmoGiver
// by default
//
// dod_ammogiver_maxrefills //set how many times ammo can be
// -refilled between respawns
// dod_ammogiver_bullets //set how many bullets to give
// -(pistols/rifles/smgs/mgs)
// dod_ammogiver_grenades //set how many grenades to give
// -(no need to explain)
// dod_ammogiver_shells //set how many shells to give
// -(bazooka/panzerschreck/piat)
//
//
// This plugin allows players to refill the ammo of the weapon/grenade
// currently in their hand by saying "/giveammo".
// You can set how often they can refill their ammo between respawns,
// as well as the amount of bullets, shells and grenades to give.
//
// To do:
//
// - nothing so far :P
//
//
// Changelog:
//
// - 25.10.2004 Version 0.8beta
// Initial Beta
//
// - 19.12.2006 Version 1.0
// No need to be a beta anymore!
// Added public cvar for tracking
// Used dod_client_spawn instead of ResetHud
// Changed client_authorized to client_putinserver
// Replaced some IF statements with switches
// Added PCVARS
// Added some 'connected' & 'alive' checks
// Got rid of unneccesary code
// Put 'dod' prefix on cvars (didnt change console command)
// Made code more 'readable'
//

DOWNLOAD MIRROR: http://mods.teamcdrive.com/download.php?view.104

{SR} *Raggy*
12-19-2006, 06:04 PM
Uldschool was saying that this has been coming up with bad load on the newest amxx. Maybe it has to be updated a tiny bit from all the changes on amxx? I'll try it now and let ye know what is wrong

diamond-optic
12-19-2006, 11:44 PM
im looking at it right now... and just glancing over it ive noticed several things that can be cleaned up... just give me a bit to actually look at it in detail :P


*edit*
- just tried it on my server.. it loads and works just fine for me.. but obviously firestorm wont be updating it lol.. i'll go ahead and just clean it up a bit and bring it up to date (such as pcvars)

diamond-optic
12-20-2006, 12:41 AM
UPDATED TO VERSION 1.0

- 19.12.2006 Version 1.0
No need to be a beta anymore!
Added public cvar for tracking
Used dod_client_spawn instead of ResetHud
Changed client_authorized to client_putinserver
Replaced some IF statements with switches
Added PCVARS
Added some 'connected' & 'alive' checks
Got rid of unneccesary code
Put 'dod' prefix on cvars (didnt change console command)
Made code more 'readable'

*** TAKE NOTICE ***

i added 'dod_' prefix to the front of the cvars (so they go together better now instead of just one cvar having the prefix) so you WILL need to update your configs for this!!!

dod_ammogiver
dod_ammogiver_maxrefills
dod_ammogiver_bullets
dod_ammogiver_grenades
dod_ammogiver_shells

.. I also left the console command as is, so it is still 'amx_ammogiver'

AND!

i feel theres no need to call this a 'beta' anymore so i jumped from 0.8beta right to version 1.0 :-)

enjoy!

{SR} *Raggy*
12-20-2006, 08:40 AM
Thanks Diamond I'll have to update it now :P

Box Cutter
12-20-2006, 09:07 AM
Probably a silly question but for the dod_ammogiver_bullets CVAR is the value I am setting for the actual amount of bullets or the amount of clips?

{SR} *Raggy*
12-20-2006, 11:46 AM
It's bullets. I'm pretty sure it's bullets anyways :P I kinda remember the plugin from a server I used to love going on too but sadly I cannot find that server anymore :(

Sebhael
12-20-2006, 04:01 PM
If I can get this to work.
I will marry you...

{SR} *Raggy*
12-20-2006, 07:22 PM
Hmmmmm.......

diamond-optic
12-20-2006, 09:05 PM
Probably a silly question but for the dod_ammogiver_bullets CVAR is the value I am setting for the actual amount of bullets or the amount of clips?

its the number of bullets

Uldschool
12-23-2006, 12:53 AM
So if I take the above sma and use the sites compiler (selecting 1.76) and take the amxx file and put it in the plugins folder. Then add dod_giveammo to the plugins.ini file and update the amxx.fg file I should have it working?

Box Cutter
12-23-2006, 01:02 AM
So if I take the above sma and use the sites compiler (selecting 1.76) and take the amxx file and put it in the plugins folder. Then add dod_giveammo to the plugins.ini file and update the amxx.fg file I should have it working?

reboot, and thats a wrap!

{SR} *Raggy*
12-23-2006, 08:30 AM
// CVARs (for amxx.cfg):
// =====================
//
// dod_ammogiver 1 = enable DoD AmmoGiver
// by default
//
// dod_ammogiver_maxrefills //set how many times ammo can be
// -refilled between respawns
// dod_ammogiver_bullets //set how many bullets to give
// -(pistols/rifles/smgs/mgs)
// ammogiver_grenades //set how many grenades to give
// -(no need to explain)
// ammogiver_shells //set how many shells to give
// -(bazooka/panzerschreck/piat)

Make sure you add that to the amxx.cfg before you change map

diamond-optic
12-24-2006, 12:59 AM
add dod_giveammo to the plugins.ini

make sure you put the .amxx extension on the plugin name too..

Uldschool
12-29-2006, 01:49 AM
I've done the above and I'm still getting a "bad load" on dod_giveammo when I check using amx_plugins command.

**EDIT**
I have it working now, thanks guys!