Fixed the CVars for model files and removed requirement for SMLib include file for compiling. Added the required SMLib functions directly to the SP file.
Still requires include files for updater and autoexecconfig (attached)
Fixed the CVars for model files and removed requirement for SMLib include file for compiling. Added the required SMLib functions directly to the SP file.
Still requires include files for updater and autoexecconfig (attached)
QUESTION:
Would this plugin drop 2 boxes (i.e. rifle ammo box and pistol ammo box), while the server also runs [CSS] Drop on Death plugin by bigbalaboom?
Quote:
Originally Posted by TnTSCS
Attached 0.2.1.5
Fixed the CVars for model files and removed requirement for SMLib include file for compiling. Added the required SMLib functions directly to the SP file.
Still requires include files for updater and autoexecconfig (attached)
Works great and no errors in logs (I've used the attached SMX):
EDIT:
There were no errors, until I've disabled AFD for a warmup time (only grenades in warmup, so...). Drop on Death plugin is running all the time:
Quote:
L 05/10/2015 - 078:26: SourceMod error session started
L 05/10/2015 - 078:26: Info (map "de_cpl_fire") (file "errors_20150510.log")
L 05/10/2015 - 078:26: [SM] Native "SDKHook" reported: Entity 5 is invalid
L 05/10/2015 - 078:26: [SM] Displaying call stack trace for plugin "ammo_from_dead.smx":
L 05/10/2015 - 078:26: [SM] [0] Line 1000, C:\Sourcemod\TnTSCS\scripting\ammo_from_dead. sp::OnEnabledChanged()
Quote:
AFD CFG
Code:
// This file was auto-generated by SourceMod (v1.7.1)
// ConVars for plugin "ammo_from_dead.smx"
// 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
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_afd_anymixedammo "1"
// Do bots drop ammo?
// 1=yes, 0=no
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_afd_botsdrop "1"
// How should the ammo model be destroyed?
// 0 = Do not destroy, leave forever
// 1 = Just make disappear
// 2 = Use disolve feature.
// -
// Default: "2"
// Minimum: "0.000000"
// Maximum: "2.000000"
sm_afd_destroymode "0"
// If sm_afd_destroymode=2, choose dissolve type
// 0 = Energy
// 1 = Heavy electrical
// 2 = Light electrical
// 3 = Core effect
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "3.000000"
sm_afd_disolvetype "3"
// Am I enabled?
// 1=yes, 0=no
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_afd_enabled "1"
// How many seconds ammo model will stay. Less than 1.0 is disabled.
// -
// Default: "20"
// Minimum: "0.000000"
sm_afd_lifetime "0"
// 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
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_afd_maxammo "1"
// Allow player to pickup ammo if "ammo type" is the same regardless of if "gun type" is different (UMP vs glock)?
// 1=yes, 0=no
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_afd_mixedammo "1"
// Specify the model to use for other weapon ammo boxes.
// -
// Default: "models/items/boxmrounds.mdl"
sm_afd_otherammo_model "models/items/boxmrounds.mdl"
// Specify the model to use for pistol ammo boxes.
// -
// Default: "models/items/boxsrounds.mdl"
sm_afd_pistolammo_model "models/items/boxsrounds.mdl"
// Drop pistol ammo?
// 1=yes, 0=no
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_afd_pistols "1"
// Who should hear the sound?
// 1 = Only the player
// 2 = Everyone in the vicinity (like normal item pickups)
// -
// Default: "1"
// Minimum: "1.000000"
// Maximum: "2.000000"
sm_afd_playsound "2"
// Drop rifle (shotty, awp, auto, rifle) ammo?
// 1=yes, 0=no
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_afd_rifles "1"
// Specify scale factor for pistol ammo box model.
// 1.0 = Unchanged
// <= 0.9 = Smaller
// >= 1.1 = Larger
// -
// Default: "1.0"
// Minimum: "0.000000"
// Maximum: "5.000000"
sm_afd_scalefactor_pistol "0.8"
// Specify scale factor for rifle ammo box model.
// 1.0 = Unchanged
// <= 0.9 = Smaller
// >= 1.1 = Larger
// -
// Default: "1.0"
// Minimum: "0.000000"
// Maximum: "5.000000"
sm_afd_scalefactor_rifle "0.7"
// Specify scale factor for shotgun ammo box model.
// 1.0 = Unchanged
// <= 0.9 = Smaller
// >= 1.1 = Larger
// -
// Default: "1.0"
// Minimum: "0.000000"
// Maximum: "5.000000"
sm_afd_scalefactor_shotgun "1.0"
// Specify the model to use for shotgun ammo boxes.
// -
// Default: "models/items/boxbuckshot.mdl"
sm_afd_sgammo_model "models/items/boxbuckshot.mdl"
// 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
// -
// Default: "1"
// Minimum: "1.000000"
// Maximum: "3.000000"
sm_afd_sound "2"
// 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"
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_afd_usecustommodels "0"
// Scale the ammo model?
// 1 = YES
// 0 = NO
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_afd_usemodelscale "1"
// Utilize 'Updater' plugin to auto-update Ammo From Dead when updates are published?
// 1=yes, 0=no
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_afd_useupdater "0"
DOD CFG
Code:
// This file was auto-generated by SourceMod (v1.7.1)
// ConVars for plugin "drop_on_death.smx"
// Toggles dropping ammo on death.
// -
// Default: "0"
sm_drop_ammo_on_death "0"
// Sound used for picking up ammo.
// -
// Default: "items/itempickup.wav"
sm_drop_ammo_pickup_sound "items/itempickup.wav"
// Percentage of depreciation for dropped armor.
// -
// Default: "0.8"
sm_drop_armor_depreciation "0.5"
// Minimum amount of armor to enable armor drop.
// -
// Default: "30"
sm_drop_armor_min "10"
// Model used for dropped armor.
// -
// Default: "models/props/cs_italy/orange.mdl"
sm_drop_armor_model "models/props/cs_italy/orange.mdl"
// Size of model to be scaled.
// -
// Default: "1.0"
sm_drop_armor_model_resize "1.0"
// Vertical offset of armor model.
// -
// Default: "0.0"
sm_drop_armor_model_voffset "0.0"
// Toggles dropping armor on death.
// -
// Default: "0"
sm_drop_armor_on_death "0"
// Sound used for picking up armor.
// -
// Default: "items/ammopickup.wav"
sm_drop_armor_pickup_sound "items/ammopickup.wav"
// Toggles removing dropped armor on resapwn.
// -
// Default: "0"
sm_drop_armor_respawn_remove "1"
// Toggles sprite and physical model for dropped armor.
// -
// Default: "0"
sm_drop_armor_sprite "0"
// Toggles dropping knife on death.
// -
// Default: "0"
sm_drop_knife_on_death "1"
// Toggles plugin on and off.
// -
// Default: "1"
sm_drop_on_death "1"
// Drop On Death Version
// -
// Default: "3.0.0"
sm_drop_on_death_version "3.0.0"
EDIT II:
When downscaling the models, sometimes they hang too high for some parts of some popular maps (awp_india_v2, de_losttemple_pro or de_cpl_fire). The same is happening with drop-on-death plugin removed/unloaded:
I'll look at the code for the error message and fix it. As for the models not sitting on the ground fully, I'll have to play around with it and see if I can reproduce.
I'll look at the code for the error message and fix it. As for the models not sitting on the ground fully, I'll have to play around with it and see if I can reproduce.