Raised This Month: $51 Target: $400
 12% 

[L4D2] Random guns ammo 1.1 [24-Dec-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
z282846139
Member
Join Date: Aug 2018
Old 02-04-2023 , 11:55   Re: [L4D2] Random guns ammo 1.1 [24-Dec-2022]
Reply With Quote #11

HTML Code:
// This file was auto-generated by SourceMod (v1.11.0.6927)
// ConVars for plugin "l4d_wam.smx"


// Amount of adrenaline shots per spot
// -
// Default: "2"
// Minimum: "0.000000"
l4d_wam_adrenaline_amount "2"

// Amount of defibrillators per spot
// -
// Default: "1"
// Minimum: "0.000000"
l4d_wam_defibrillator_amount "1"

// 1 = Plugin on, 0 = Plugin off
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_wam_enabled "1"

// Amount of explosive ammo packs per spot
// -
// Default: "1"
// Minimum: "0.000000"
l4d_wam_explosive_ammo_amount "1"

// Amount of grenade launchers per spot
// -
// Default: "1"
// Minimum: "0.000000"
l4d_wam_grenade_launcher_amount "1"

// Amount of incendiary ammo packs per spot
// -
// Default: "1"
// Minimum: "0.000000"
l4d_wam_incendiary_ammo_amount "1"

// Amount of m60 rifles per spot
// -
// Default: "1"
// Minimum: "0.000000"
l4d_wam_m60_amount "1"

// Amount of first aid kits per spot
// -
// Default: "2"
// Minimum: "0.000000"
l4d_wam_medkit_amount "2"

// Amount of melee weapons per spot
// -
// Default: "1"
// Minimum: "0.000000"
l4d_wam_melee_amount "1"

// Amount of molotovs per spot
// -
// Default: "1"
// Minimum: "0.000000"
l4d_wam_molotov_amount "1"

// Amount of pain pills per spot
// -
// Default: "2"
// Minimum: "0.000000"
l4d_wam_pain_pills_amount "2"

// Amount of pipe bombs per spot
// -
// Default: "1"
// Minimum: "0.000000"
l4d_wam_pipe_bomb_amount "1"

// Amount of pistols per spot
// -
// Default: "9"
// Minimum: "0.000000"
l4d_wam_pistol_amount "9"

// Amount of magnum pistols per spot
// -
// Default: "9"
// Minimum: "0.000000"
l4d_wam_pistol_magnum_amount "9"

// Modify only weapon amounts when round starts.
// This prevents modifying weapon amount created by other plugins in midgame.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_wam_roundstart_only "1"

// Amount of vomitjars per spot
// -
// Default: "1"
// Minimum: "0.000000"
l4d_wam_vomitjar_amount "1"

// Amount of primary weapons per spot
// -
// Default: "9"
// Minimum: "0.000000"
l4d_wam_weapon_amount "9"
z282846139 is offline
Iciaria
Member
Join Date: Aug 2022
Old 02-04-2023 , 12:07   Re: [L4D2] Random guns ammo 1.1 [24-Dec-2022]
Reply With Quote #12

Make sure "l4d_weapon_amount_modifier.cfg" is configured to only allow a single weapon to spawn.
__________________
Sorry,my english not good
Iciaria is offline
z282846139
Member
Join Date: Aug 2018
Old 02-04-2023 , 13:09   Re: [L4D2] Random guns ammo 1.1 [24-Dec-2022]
Reply With Quote #13

Quote:
Originally Posted by Iciaria View Post
Make sure "l4d_weapon_amount_modifier.cfg" is configured to only allow a single weapon to spawn.
If I set 1 primary weapon per spot
Code:
l4d_wam_weapon_amount "1"
It will only spawn one weapon at the beginning, the other players will have no gun to shot.
Finally I set it to 4, although it still create multi shotgun, but less than before, I can stand it.
z282846139 is offline
sonic155
Senior Member
Join Date: Mar 2019
Old 02-05-2023 , 16:10   Re: [L4D2] Random guns ammo 1.1 [24-Dec-2022]
Reply With Quote #14

https://www.youtube.com/watch?v=Ekv6XotqpAc

log notes below
Spoiler

Last edited by sonic155; 02-05-2023 at 21:16. Reason: adding video
sonic155 is offline
sonic155
Senior Member
Join Date: Mar 2019
Old 02-05-2023 , 16:15   Re: [L4D2] Random guns ammo 1.1 [24-Dec-2022]
Reply With Quote #15

https://www.youtube.com/watch?v=2VSWRHtOwTw

log notes below
Spoiler


Spoiler


Spoiler

Last edited by sonic155; 02-05-2023 at 21:17. Reason: making it look nice xD
sonic155 is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 02-05-2023 , 19:38   Re: [L4D2] Random guns ammo 1.1 [24-Dec-2022]
Reply With Quote #16

this kind of log should be put in a spoiler tag cause it pollutes too much the readbility
__________________
Marttt is offline
sonic155
Senior Member
Join Date: Mar 2019
Old 02-05-2023 , 21:14   Re: [L4D2] Random guns ammo 1.1 [24-Dec-2022]
Reply With Quote #17

Quote:
Originally Posted by Marttt View Post
this kind of log should be put in a spoiler tag cause it pollutes too much the readbility
spoiler? uhhhh i barely learn how to do
Quote:
this
Spoiler



oh shit its that easy huh.... one sec ill fix that then

Last edited by sonic155; 02-05-2023 at 21:15. Reason: uhh
sonic155 is offline
sonic155
Senior Member
Join Date: Mar 2019
Old 02-05-2023 , 21:17   Re: [L4D2] Random guns ammo 1.1 [24-Dec-2022]
Reply With Quote #18

There we go =D
sonic155 is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 02-28-2023 , 14:24   Re: [L4D2] Random guns ammo 1.1 [24-Dec-2022]
Reply With Quote #19

Code:
L 03/01/2023 - 02:51:13: [SM] Exception reported: Property "m_iPrimaryAmmoType" not found (entity 39/terror_player_manager)
L 03/01/2023 - 02:51:13: [SM] Blaming: l4d2_RandomAmmo.smx
L 03/01/2023 - 02:51:13: [SM] Call stack trace:
L 03/01/2023 - 02:51:13: [SM]   [0] GetEntProp
L 03/01/2023 - 02:51:13: [SM]   [1] Line 872, d:\Github\Private-Work\L4D2-插件\scripting_1.11\l4d2_RandomAmmo.sp::Weapon_GetPrimaryAmmoType
L 03/01/2023 - 02:51:13: [SM]   [2] Line 860, d:\Github\Private-Work\L4D2-插件\scripting_1.11\l4d2_RandomAmmo.sp::SetClientReservedAmmo
L 03/01/2023 - 02:51:13: [SM]   [3] Line 831, d:\Github\Private-Work\L4D2-插件\scripting_1.11\l4d2_RandomAmmo.sp::rEvent_Item_Pickup
Use EntIndexToEntRef().
https://wiki.alliedmods.net/Entity_R...es_(SourceMod)

EntRefToEntIndex to retrieve an entity index from a reference, if the entity no longer exists the value will be -1 (INVALID_ENT_REFERENCE).


PHP Code:
g_iweapon EntIndexToEntRef(entity);

..
..

int entity EntRefToEntIndex(g_iweapon);

if (
entity == INVALID_ENT_REFERENCE// Check if entity still exists
    
return; 
To check if entity has "m_iPrimaryAmmoType" prop,
PHP Code:
if(HasEntProp(weaponProp_Data"m_iPrimaryAmmoType") == true)
{


__________________

Last edited by HarryPotter; 02-28-2023 at 15:28.
HarryPotter is offline
Iciaria
Member
Join Date: Aug 2022
Old 03-01-2023 , 06:13   Re: [L4D2] Random guns ammo 1.1 [24-Dec-2022]
Reply With Quote #20

Quote:
Originally Posted by HarryPotter View Post
Code:
L 03/01/2023 - 02:51:13: [SM] Exception reported: Property "m_iPrimaryAmmoType" not found (entity 39/terror_player_manager)
L 03/01/2023 - 02:51:13: [SM] Blaming: l4d2_RandomAmmo.smx
L 03/01/2023 - 02:51:13: [SM] Call stack trace:
L 03/01/2023 - 02:51:13: [SM]   [0] GetEntProp
L 03/01/2023 - 02:51:13: [SM]   [1] Line 872, d:\Github\Private-Work\L4D2-插件\scripting_1.11\l4d2_RandomAmmo.sp::Weapon_GetPrimaryAmmoType
L 03/01/2023 - 02:51:13: [SM]   [2] Line 860, d:\Github\Private-Work\L4D2-插件\scripting_1.11\l4d2_RandomAmmo.sp::SetClientReservedAmmo
L 03/01/2023 - 02:51:13: [SM]   [3] Line 831, d:\Github\Private-Work\L4D2-插件\scripting_1.11\l4d2_RandomAmmo.sp::rEvent_Item_Pickup
Use EntIndexToEntRef().
https://wiki.alliedmods.net/Entity_R...es_(SourceMod)

EntRefToEntIndex to retrieve an entity index from a reference, if the entity no longer exists the value will be -1 (INVALID_ENT_REFERENCE).


PHP Code:
g_iweapon EntIndexToEntRef(entity);

..
..

int entity EntRefToEntIndex(g_iweapon);

if (
entity == INVALID_ENT_REFERENCE// Check if entity still exists
    
return; 
To check if entity has "m_iPrimaryAmmoType" prop,
PHP Code:
if(HasEntProp(weaponProp_Data"m_iPrimaryAmmoType") == true)
{


Thank you for your prompt! But I won't update the plugin.
There are too many problems in the current version plugin, I plan to rewrite it with dhhoks.
I try to fix these problems in the new version.
__________________
Sorry,my english not good

Last edited by Iciaria; 03-01-2023 at 06:14.
Iciaria is offline
Reply



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 06:59.


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