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

[L4D2] Skills


Post New Thread Reply   
 
Thread Tools Display Modes
lightphoenix2
Member
Join Date: Feb 2016
Old 04-04-2022 , 10:17   Re: [L4D2] Skills
Reply With Quote #171

Quote:
Originally Posted by Marttt View Post
Client index error usually means that the client disconnected.
index 8 is a client index so is not a common infected

Probably is just missing a safe check at the previous line
PHP Code:
IsClientInGame(client
Before it can go through, theres a check done
PHP Code:
        if (!(bIsValidClient(victim) && bIsValidClient(attacker)))
            return; 
PHP Code:
static bool bIsValidClient(int client)
{
    return 
client && client <= MaxClients && IsClientInGame(client) && !IsClientInKickQueue(client);

Reason why I say it could be a common infected was because the game will show that a player downed someone when a common infected down them. And the friendly fire detection also triggers when a common infected hit a player.

Last edited by lightphoenix2; 04-04-2022 at 10:20.
lightphoenix2 is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 04-04-2022 , 12:12   Re: [L4D2] Skills
Reply With Quote #172

from l4d2_skills_core_V2.3.sp

(line 432)

PHP Code:
GetClientName(itNamesizeof(tName)); 
Looping through all clients without checking if the client is in-game

(line 424)

PHP Code:
for (int i 0<= MAXPLAYERSi++) 
This error is because the Damage array is not being reset when a client connect/disconnect

So a quick fix would be adding a check to line 426:

PHP Code:


            
for (int i 1<= MAXPLAYERSi++) // "i" probably should start from 1
            
{
                if (!
IsClientInGame(i))
                {
                    
Damage[i][victim] = 0.0// better set this on player disconnect btw
                    
continue;
                }
                
                if (
Damage[i][victim] > 0)
                ...
            } 
__________________

Last edited by Marttt; 04-04-2022 at 12:16.
Marttt is offline
sonic155
Senior Member
Join Date: Mar 2019
Old 04-04-2022 , 20:59   Re: [L4D2] Skills
Reply With Quote #173

Quote:
Originally Posted by Marttt View Post
from l4d2_skills_core_V2.3.sp

(line 432)

PHP Code:
GetClientName(itNamesizeof(tName)); 
Looping through all clients without checking if the client is in-game

(line 424)

PHP Code:
for (int i 0<= MAXPLAYERSi++) 
This error is because the Damage array is not being reset when a client connect/disconnect

So a quick fix would be adding a check to line 426:

PHP Code:


            
for (int i 1<= MAXPLAYERSi++) // "i" probably should start from 1
            
{
                if (!
IsClientInGame(i))
                {
                    
Damage[i][victim] = 0.0// better set this on player disconnect btw
                    
continue;
                }
                
                if (
Damage[i][victim] > 0)
                ...
            } 







is this added to the SP file or do we add it Manually ourselfs? ~worryed ill mess up the SP file x.x~
sonic155 is offline
lightphoenix2
Member
Join Date: Feb 2016
Old 04-06-2022 , 00:01   Re: [L4D2] Skills
Reply With Quote #174

Quote:
Originally Posted by Marttt View Post
from l4d2_skills_core_V2.3.sp

(line 432)

PHP Code:
GetClientName(itNamesizeof(tName)); 
Looping through all clients without checking if the client is in-game

(line 424)

PHP Code:
for (int i 0<= MAXPLAYERSi++) 
This error is because the Damage array is not being reset when a client connect/disconnect

So a quick fix would be adding a check to line 426:

PHP Code:


            
for (int i 1<= MAXPLAYERSi++) // "i" probably should start from 1
            
{
                if (!
IsClientInGame(i))
                {
                    
Damage[i][victim] = 0.0// better set this on player disconnect btw
                    
continue;
                }
                
                if (
Damage[i][victim] > 0)
                ...
            } 
Thanks Martttt, I will try it out!
lightphoenix2 is offline
lightphoenix2
Member
Join Date: Feb 2016
Old 04-06-2022 , 00:07   Re: [L4D2] Skills
Reply With Quote #175

Okay, I have added a few lines. Hope it helps.

Thanks Marttt for the solution~
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_skills_core_V2.3.sp - 92 views - 45.7 KB)
File Type: smx l4d2_skills_core_V2.3.smx (25.9 KB, 74 views)
lightphoenix2 is offline
sonic155
Senior Member
Join Date: Mar 2019
Old 04-06-2022 , 03:43   Re: [L4D2] Skills
Reply With Quote #176

Quote:
Originally Posted by lightphoenix2 View Post
Okay, I have added a few lines. Hope it helps.

Thanks Marttt for the solution~
~~~


i think it broke it


L 04/06/2022 - 00:42:26: SourceMod error session started
L 04/06/2022 - 00:42:26: Info (map "c1m1_hotel") (file "C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\logs\errors_202 20406.log")
L 04/06/2022 - 00:42:26: [SM] Failed to load plugin "l4d2_skills_core_V2.3.smx": Unable to load plugin (unsupported feature set; code is too new).
L 04/06/2022 - 00:42:27: [SM] Unable to load plugin "l4d2_anitdamage_m.smx": Native "RegisterPerk" was not found
L 04/06/2022 - 00:42:27: [SM] Unable to load plugin "l4d2_doublejump_m.smx": Native "RegisterPerk" was not found
L 04/06/2022 - 00:42:27: [SM] Unable to load plugin "l4d2_epic_molotov_m.smx": Native "RegisterPerk" was not found
L 04/06/2022 - 00:42:27: [SM] Unable to load plugin "l4d2_fastreload_m.smx": Native "RegisterPerk" was not found
L 04/06/2022 - 00:42:27: [SM] Unable to load plugin "l4d2_helping_hand.smx": Native "RegisterPerk" was not found
L 04/06/2022 - 00:42:27: [SM] Unable to load plugin "l4d2_machine_m.smx": Native "RegisterPerk" was not found
L 04/06/2022 - 00:42:27: [SM] Unable to load plugin "l4d2_melee_damage_m.smx": Native "RegisterPerk" was not found
L 04/06/2022 - 00:42:27: [SM] Unable to load plugin "l4d2_perfect_shove_m.smx": Native "RegisterPerk" was not found
L 04/06/2022 - 00:42:28: [SM] Unable to load plugin "l4d2_ultra_pipe_bomb_m.smx": Native "RegisterPerk" was not found
sonic155 is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 04-06-2022 , 07:45   Re: [L4D2] Skills
Reply With Quote #177

Quote:
unsupported feature set; code is too new
Probably an issue with SM version:
"compiled with too new a version of spcomp compared to the SM version on the server"

BTW I forgot, the loop should be:

PHP Code:
for (int i 1<= MaxClientsi++) 
MaxClients instead of MAXPLAYERS
__________________

Last edited by Marttt; 04-06-2022 at 07:46.
Marttt is offline
sonic155
Senior Member
Join Date: Mar 2019
Old 04-07-2022 , 00:00   Re: [L4D2] Skills
Reply With Quote #178

L 04/06/2022 - 20:52:01: SourceMod error session started
L 04/06/2022 - 20:52:01: Info (map "c1m1_hotel") (file "C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\logs\errors_202 20406.log")
L 04/06/2022 - 20:52:01: [SM] Exception reported: Client 3 is not connected
L 04/06/2022 - 20:52:01: [SM] Blaming: l4d2_skills_core_V2.3.smx
L 04/06/2022 - 20:52:01: [SM] Call stack trace:
L 04/06/2022 - 20:52:01: [SM] [0] GetClientName
L 04/06/2022 - 20:52:01: [SM] [1] Line 560, l4d2_skills_core_V2.3.sp::Event_WitchKilled
sonic155 is offline
lightphoenix2
Member
Join Date: Feb 2016
Old 04-08-2022 , 02:17   Re: [L4D2] Skills
Reply With Quote #179

Ah that makes sense, MaxClients instead of MaxPlayers.
I also applied it to the Witch.

SourceMod version I use to build the plugin is:
SourceMod Version: 1.11.0.6859
SourcePawn Engine: 1.11.0.6859, jit-x86 (build 1.11.0.6859)
SourcePawn API: v1 = 5, v2 = 16
Compiled on: Feb 25 2022 08:414
Built from: https://github.com/alliedmodders/sou...ommit/dc8a22a7
Build ID: 6859:dc8a22a7
Attached Files
File Type: smx l4d2_skills_core_V2.3.smx (26.0 KB, 133 views)
File Type: sp Get Plugin or Get Source (l4d2_skills_core_V2.3.sp - 103 views - 45.9 KB)

Last edited by lightphoenix2; 04-08-2022 at 02:18.
lightphoenix2 is offline
sonic155
Senior Member
Join Date: Mar 2019
Old 04-12-2022 , 01:58   Re: [L4D2] Skills
Reply With Quote #180

Quote:
Originally Posted by lightphoenix2 View Post
Hi, I'm including all the files needed for this plugin.
changelog
Code:
Added Ability to throw your Melee weapon to Melee++, Original: Link
Added Lethal Weapons, Non-passive, Original: Link
Added Auto Machine, Non-passive, Original: Link
Added Critical Shot, Passive
    - Fixed Critical Shot Error messages
Added Torchlight, Passive, Original: Link
Added Melee Range, Team Improvement
Added Pistol++, Passive, deals extra damage to all infected including common infected (At certain level you can press and hold your pistol to shoot, From: Link)
Added Reduce Friendly Fire, Passive, Chance to remove friendly fire

Skill Core changes:
Display damage done to Special infected, Tank and Witch and the amount of money earned from killing/dealing damage
Fixed Admin Set/Transfer money
Added Friendly Fire tracking - Will print Total Friendly Fire count when escaped

Currently Testing a feature where it will store your data using your steam ID instead of client ID due to players disconnecting and reconnecting and getting a different client ID
Ths applies to:
 - Player Balance
 - Friendly Fire Count
 - Passive: Sleight of Hand
Required Plugin:
Weapon Handling API

Let me know if there is any other issue.


the { Auto Machine } offen blocks players from shooting there guns and if used with ~ https://forums.alliedmods.net/showthread.php?p=2668632 ~ [Prototype Grenades] if the grenade has trigger on hit then the Machine blocks it and forces it to fall to the floor at the player's feet the hit box of the Machine stops the throw
on another note the hitbox is being mistaken by tanks as they try to climb the Machine if said Machine is on the player


~~~~

the plugin Prototype Grenades is not to blame on the blocking it seems the turret's hitbox is to blame i think making the turret with no hitbox so players can fade though it along with the throwbles as well or making it where it has no hitbox when its being carryed?

Last edited by sonic155; 04-13-2022 at 22:07. Reason: update
sonic155 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 08:57.


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