Give this version a shot.
*
Version 0.2.1.1
* + Added ability to change scale of models (requested by Allower -
https://forums.alliedmods.net/member.php?u=237510)
* + Added ability to use custom models
There are quite a few new CVars. I put on
Impact123's AutoExecConfig include file so all the new CVars should be added to your plugin.ammo_from_dead.cfg file.
Full CVar List
Code:
"sm_afd_usecustommodels" = "0" min. 0.000000 max. 1.000000
- Use models other than default valve models?
1 = YES
0 = NO
If YES, you must enter all related files into "sourcemod/configs/ammo_from_dead.ini"
"sm_afd_sgammo_model" = "models/items/boxsrounds.mdl"
- Specify the model to use for shotgun ammo boxes.
"sm_afd_otherammo_model" = "models/items/boxsrounds.mdl"
- Specify the model to use for other weapon ammo boxes.
"sm_afd_pistolammo_model" = "models/items/boxsrounds.mdl"
- Specify the model to use for pistol ammo boxes.
"sm_afd_scalefactor" = "1.0" min. 0.000000 max. 5.000000
- Specify scale factor for model.
1.0 = Unchanged
<= 0.9 = Smaller
>= 1.1 = Larger
"sm_afd_usemodelscale" = "0" min. 0.000000 max. 1.000000
- Scale the ammo model?
1 = YES
0 = NO
"sm_afd_disolvetype" = "3" min. 0.000000 max. 3.000000
- If sm_afd_destroymode=2, choose dissolve type
0 = Energy
1 = Heavy electrical
2 = Light electrical
3 = Core effect
"sm_afd_destroymode" = "0" ( def. "2" ) min. 0.000000 max. 2.000000
- How should the ammo model be destroyed?
0 = Do not destroy, leave forever
1 = Just make disappear
2 = Use disolve feature.
"sm_afd_lifetime" = "3" ( def. "20" ) min. 0.000000
- How many seconds ammo model will stay. Less than 1.0 is disabled.
"sm_afd_useupdater" = "0" min. 0.000000 max. 1.000000
- Utilize 'Updater' plugin to auto-update Ammo From Dead when updates are published?
1=yes, 0=no
"sm_afd_playsound" = "1" min. 1.000000 max. 2.000000
- Who should hear the sound?
1 = Only the player
2 = Everyone in the vicinity (like normal item pickups)
"sm_afd_sound" = "1" min. 1.000000 max. 3.000000
- Which sound should we play when ammo is picked up?
1 = cstrike/items/itempickup.wav
2 = hl2/items/ammo_pickup.wav
3 = cstrike/items/ammopickup.wav
"sm_afd_maxammo" = "1" min. 0.000000 max. 1.000000
- Should plugin abide by the weapon's max ammo when picking up dropped ammo?
If yes, then the left over ammo will remain on the ground. If all of the ammo is picked up, then the ammo box will disappear.
1=yes, 0=no
"sm_afd_rifles" = "1" min. 0.000000 max. 1.000000
- Drop rifle (shotty, awp, auto, rifle) ammo?
1=yes, 0=no
"sm_afd_pistols" = "1" min. 0.000000 max. 1.000000
- Drop pistol ammo?
1=yes, 0=no
"sm_afd_anymixedammo" = "1" ( def. "0" ) min. 0.000000 max. 1.000000
- If ON, players can refill their pistol ammo by picking up any pistol ammo box,
same for shotguns with shotgun ammo box, and the same for
rifles (SMG, Rifle,Sniper Rifle, and Machine Gun) with rifle ammo box.
1=ON, 0=OFF
"sm_afd_mixedammo" = "1" min. 0.000000 max. 1.000000
- Allow player to pickup ammo if "ammo type" is the same regardless of if "guntype" is different (UMP vs glock)?
1=yes, 0=no
"sm_afd_botsdrop" = "1" min. 0.000000 max. 1.000000
- Do bots drop ammo?
1=yes, 0=no
"sm_afd_enabled" = "1" min. 0.000000 max. 1.000000
- Am I enabled?
1=yes, 0=no
Once tested, I'll updated the first post with this new version. I tested the model scale and it works pretty neat - even looks like fun using big models
but 0.5 for model scale looks about right.
Here's a sample of the configs\ammo_from_dead.cfg
Code:
// ammo_from_dead models download for the ammo boxes
models\weapons\rifleshell.dx80.vtx
models\weapons\rifleshell.dx90.vtx
models\weapons\rifleshell.mdl
models\weapons\rifleshell.sw.vtx
models\weapons\rifleshell.vvd
materials\models\weapons\black.vmt
materials\models\weapons\rifleshellback.vmt
materials\models\weapons\rifleshellside.vmt