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

[L4D2] Jump Avoiding for Survivors 4.10 (unapproved)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
little_froy
Senior Member
Join Date: May 2021
Plugin ID:
7693
Plugin Version:
4.10
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    [L4D2] Jump Avoiding
    Unapprover:
    Reason for Unapproving:
    Request by author
    Old 06-20-2021 , 07:20   [L4D2] Jump Avoiding for Survivors 4.10 (unapproved)
    Reply With Quote #1

    (unapproved)

    Last edited by little_froy; 01-23-2023 at 10:48.
    little_froy is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-20-2021 , 09:28   Re: [L4D2] Jump Avoiding and Break Chi Escape for Survivors (NO sm_cvar)
    Reply With Quote #2

    People like to customize stuff, refusing to add cvars and stating you hate them in your other thread does not seem very good. You reasons are unfounded, it's easy to work with them and get default value etc.

    Looking through your code there's a bunch of issues:

    - Not precaching models in OnMapStart.
    - Using KillTimer instead of delete.
    - Repeating timers should use "return Plugin_Continue" at the end or whenever you want the loop to continue.
    - You don't pass a clients userid to timers, which you should be doing and verifying they exist. See the [TUT] thread in my sig for details.
    - Worse still I've seen you not verify that clients are valid in timer callbacks at all in some of your other plugins.
    - You don't use translations in your plugins, do you expect people to translate into their own language or something, hardcoding it? How can you expect more people to use your plugins in this state?
    - You inefficiently use "StrContains" when you should be using something simple and way more efficient like strcmp(Weaponname[7], "chainsaw"); for example.

    I'm sure there are plenty other issues and errors your plugins will throw when used. I've only briefly gone through and this is what I've noticed so far.

    Please look through the [TUT] thread in my signature to help learn more about common mistakes and good coding practice.
    __________________
    Silvers is offline
    little_froy
    Senior Member
    Join Date: May 2021
    Old 06-20-2021 , 10:55   Re: [L4D2] Jump Avoiding and Break Chi Escape for Survivors (NO sm_cvar)
    Reply With Quote #3

    Quote:
    Originally Posted by Silvers View Post
    People like to customize stuff, refusing to add cvars and stating you hate them in your other thread does not seem very good. You reasons are unfounded, it's easy to work with them and get default value etc.

    Looking through your code there's a bunch of issues:

    - Not precaching models in OnMapStart.
    - Using KillTimer instead of delete.
    - Repeating timers should use "return Plugin_Continue" at the end or whenever you want the loop to continue.
    - You don't pass a clients userid to timers, which you should be doing and verifying they exist. See the [TUT] thread in my sig for details.
    - Worse still I've seen you not verify that clients are valid in timer callbacks at all in some of your other plugins.
    - You don't use translations in your plugins, do you expect people to translate into their own language or something, hardcoding it? How can you expect more people to use your plugins in this state?
    - You inefficiently use "StrContains" when you should be using something simple and way more efficient like strcmp(Weaponname[7], "chainsaw"); for example.

    I'm sure there are plenty other issues and errors your plugins will throw when used. I've only briefly gone through and this is what I've noticed so far.

    Please look through the [TUT] thread in my signature to help learn more about common mistakes and good coding practice.
    cvar cannot be load right when every first round start.
    no runtime error have been thorw till then.
    i don't like delete cause that mean stack varible of C++.
    use clientd but not userid to unify type. modify by clientid but timer use userid is uncoordinated.
    use strcontain not strcmp cause i got weapon name by geteditclassname.there may "weapon_" in front of weaponname.
    text not the point but the numbers.
    Thanks

    Last edited by little_froy; 06-20-2021 at 10:58.
    little_froy is offline
    little_froy
    Senior Member
    Join Date: May 2021
    Old 06-20-2021 , 11:07   Re: [L4D2] Jump Avoiding and Break Chi Escape for Survivors (NO sm_cvar)
    Reply With Quote #4

    have been tested in localplay, multiplay, afk, teamchanged. no runtime error thorw anf looks like.no problem
    Quote:
    Originally Posted by little_froy View Post
    cvar cannot be load right when every first round start.
    no runtime error have been thorw till then.have been test in localplay, multiplay, afk, changeteam, death.
    i don't like delete cause that mean stack varible of C++.
    use clientd but not userid to unify type. modify by clientid but timer use userid is uncoordinated.
    use strcontain not strcmp cause i got weapon name by geteditclassname.there may "weapon_" in front of weaponname.
    text not the point but the numbers.
    Thanks

    Last edited by little_froy; 06-20-2021 at 11:09.
    little_froy is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-20-2021 , 11:26   Re: [L4D2] Jump Avoiding and Break Chi Escape for Survivors (NO sm_cvar)
    Reply With Quote #5

    Quote:
    Originally Posted by little_froy View Post
    cvar cannot be load right when every first round start.
    no runtime error have been thorw till then.
    i don't like delete cause that mean stack varible of C++.
    use clientd but not userid to unify type. modify by clientid but timer use userid is uncoordinated.
    use strcontain not strcmp cause i got weapon name by geteditclassname.there may "weapon_" in front of weaponname.
    text not the point but the numbers.
    Thanks
    Yes there will always be "weapon_" in front when getting a players weapon, thats why you can skip it with classname[7] and using strcmp, it's more efficient, the weapon names don't change or suddenly not have "weapon_" in front, only certain events or things would return without "weapon_" but in that case you know about it and it won't suddenly have "weapon_" in front.

    I don't know what you mean by delete. That's now the standard for killing a timer and resetting the handle and closing other handles too.


    Quote:
    Originally Posted by little_froy View Post
    have been tested in localplay, multiplay, afk, teamchanged. no runtime error thorw anf looks like.no problem
    I can guarantee you 100% there will be people reporting errors if they use it. You do not valid client indexes on timers, all it takes it someone to disconnect while the timer is active and you'll have errors filling the error logs. Just because you haven't had an issue is not an excuse to not bother validating client and entity indexes correctly. That's either being lazy or ignorant.
    __________________
    Silvers is offline
    little_froy
    Senior Member
    Join Date: May 2021
    Old 06-20-2021 , 18:45   Re: [L4D2] Jump Avoiding and Break Chi Escape for Survivors (NO sm_cvar)
    Reply With Quote #6

    Quote:
    Originally Posted by Silvers View Post
    Yes there will always be "weapon_" in front when getting a players weapon, thats why you can skip it with classname[7] and using strcmp, it's more efficient, the weapon names don't change or suddenly not have "weapon_" in front, only certain events or things would return without "weapon_" but in that case you know about it and it won't suddenly have "weapon_" in front.

    I don't know what you mean by delete. That's now the standard for killing a timer and resetting the handle and closing other handles too.



    I can guarantee you 100% there will be people reporting errors if they use it. You do not valid client indexes on timers, all it takes it someone to disconnect while the timer is active and you'll have errors filling the error logs. Just because you haven't had an issue is not an excuse to not bother validating client and entity indexes correctly. That's either being lazy or ignorant.

    no runtime error throw when test while 2 players afk, team, death, reconnect. i have no more devices or accounts. i am lazy cause the timer only change some flag vavirbles but not modify the client directly. if that happen, there will be some judgement or timerclear in some case. and the quick melee plugin no longer use timer now

    Last edited by little_froy; 06-20-2021 at 22:03.
    little_froy is offline
    little_froy
    Senior Member
    Join Date: May 2021
    Old 06-20-2021 , 19:19   Re: [L4D2] Jump Avoiding and Break Chi Escape for Survivors (NO sm_cvar)
    Reply With Quote #7

    Quote:
    Originally Posted by Silvers View Post
    People like to customize stuff, refusing to add cvars and stating you hate them in your other thread does not seem very good. You reasons are unfounded, it's easy to work with them and get default value etc.

    Looking through your code there's a bunch of issues:

    - Not precaching models in OnMapStart.
    - Using KillTimer instead of delete.
    - Repeating timers should use "return Plugin_Continue" at the end or whenever you want the loop to continue.
    - You don't pass a clients userid to timers, which you should be doing and verifying they exist. See the [TUT] thread in my sig for details.
    - Worse still I've seen you not verify that clients are valid in timer callbacks at all in some of your other plugins.
    - You don't use translations in your plugins, do you expect people to translate into their own language or something, hardcoding it? How can you expect more people to use your plugins in this state?
    - You inefficiently use "StrContains" when you should be using something simple and way more efficient like strcmp(Weaponname[7], "chainsaw"); for example.

    I'm sure there are plenty other issues and errors your plugins will throw when used. I've only briefly gone through and this is what I've noticed so far.

    Please look through the [TUT] thread in my signature to help learn more about common mistakes and good coding practice.
    did you know there are some developer made up the cvar-in-cfg loading library to solve the first-time-cvar-loading issus ? but it's not the things should player or modder to do but sourcemod offical. that't why i don't like sm_cvar.
    Attached Files
    File Type: inc ns.inc (23.4 KB, 107 views)
    little_froy is offline
    little_froy
    Senior Member
    Join Date: May 2021
    Old 06-21-2021 , 00:57   Re: [L4D2] Jump Avoiding and Break Chi Escape for Survivors (NO sm_cvar)
    Reply With Quote #8

    Quote:
    Originally Posted by Silvers View Post
    People like to customize stuff, refusing to add cvars and stating you hate them in your other thread does not seem very good. You reasons are unfounded, it's easy to work with them and get default value etc.

    Looking through your code there's a bunch of issues:

    - Not precaching models in OnMapStart.
    - Using KillTimer instead of delete.
    - Repeating timers should use "return Plugin_Continue" at the end or whenever you want the loop to continue.
    - You don't pass a clients userid to timers, which you should be doing and verifying they exist. See the [TUT] thread in my sig for details.
    - Worse still I've seen you not verify that clients are valid in timer callbacks at all in some of your other plugins.
    - You don't use translations in your plugins, do you expect people to translate into their own language or something, hardcoding it? How can you expect more people to use your plugins in this state?
    - You inefficiently use "StrContains" when you should be using something simple and way more efficient like strcmp(Weaponname[7], "chainsaw"); for example.

    I'm sure there are plenty other issues and errors your plugins will throw when used. I've only briefly gone through and this is what I've noticed so far.

    Please look through the [TUT] thread in my signature to help learn more about common mistakes and good coding practice.

    could you please change the under short links to full link? the http domain is denied by China but the https won't. however if you put full link, i and other users needn't add "https://" in front of the domain

    Last edited by little_froy; 06-21-2021 at 00:58.
    little_froy is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-21-2021 , 07:20   Re: [L4D2] Jump Avoiding and Break Chi Escape for Survivors (NO sm_cvar)
    Reply With Quote #9

    Quote:
    Originally Posted by little_froy View Post
    no runtime error throw when test while 2 players afk, team, death, reconnect. i have no more devices or accounts. i am lazy cause the timer only change some flag vavirbles but not modify the client directly. if that happen, there will be some judgement or timerclear in some case. and the quick melee plugin no longer use timer now
    Does not matter if the timer is 10 seconds or 0.1 seconds or using RequestFrame, an entity/client can delete/disconnect in that time and throw errors, I've seen it with RequestFrame in such a short time it can happen. Being lazy is no excuse for poor coding like this. Now you know, make the fix. Otherwise I'll recommend people not to use your plugins because they're slap dash quickly put together with little support/information/features catered for the public, such as translations, you might as well just keep this private.



    Quote:
    Originally Posted by little_froy View Post
    did you know there are some developer made up the cvar-in-cfg loading library to solve the first-time-cvar-loading issus ? but it's not the things should player or modder to do but sourcemod offical. that't why i don't like sm_cvar.
    I really don't understand what your problem is with cvars. Look at any of my plugins. They detect the cvars on loading, late loading and when changed. Of course when the server starts the cvar configs are not parsed yet, this should not be a problem for any of your plugins unless it's critical to do something before other plugins have loaded or so early on in the start sequence. I still don't see any use cases where you can't get the correct value. Maybe you need the Command and ConVar Buffer Overflow Fixer plugin in my signature, if you have too many cvars their values saved in the config are no longer read and that plugin fixes it.



    Quote:
    Originally Posted by little_froy View Post
    could you please change the under short links to full link? the http domain is denied by China but the https won't. however if you put full link, i and other users needn't add "https://" in front of the domain
    Changed. [TUT] Scripting
    __________________
    Silvers is offline
    little_froy
    Senior Member
    Join Date: May 2021
    Old 06-21-2021 , 09:12   Re: [L4D2] Jump Avoiding and Break Chi Escape for Survivors (NO sm_cvar)
    Reply With Quote #10

    Quote:
    Originally Posted by Silvers View Post
    Does not matter if the timer is 10 seconds or 0.1 seconds or using RequestFrame, an entity/client can delete/disconnect in that time and throw errors, I've seen it with RequestFrame in such a short time it can happen. Being lazy is no excuse for poor coding like this. Now you know, make the fix. Otherwise I'll recommend people not to use your plugins because they're slap dash quickly put together with little support/information/features catered for the public, such as translations, you might as well just keep this private.





    I really don't understand what your problem is with cvars. Look at any of my plugins. They detect the cvars on loading, late loading and when changed. Of course when the server starts the cvar configs are not parsed yet, this should not be a problem for any of your plugins unless it's critical to do something before other plugins have loaded or so early on in the start sequence. I still don't see any use cases where you can't get the correct value. Maybe you need the Command and ConVar Buffer Overflow Fixer plugin in my signature, if you have too many cvars their values saved in the config are no longer read and that plugin fixes it.





    Changed. [TUT] Scripting

    That doesn't make sense. i've test with two players(i only have 2 accounts) again just now in the normal 8 players versus server. with 2 survivors case of 1 vs 1 case, everything is just fine and no runtime error thrown after using with death/ change team/ disconnect, and functions sill work after reconnect(server and round have not end, reconnect for a few times to travel all survivors who used). Look at the code under, i already add some HookEvent to ReSet in some case but not OnClientConnected() that's better of couse. after i noticed use OnGameFrame still makes the problem and fix up them.i am glad to fix and improve the code if errors throw again.
    i admit my plugins are simple things but they are the enough to funkly tease and slash the special infecteds for me. i nerver give up to fix or imrove. but you didn't show me any real error post today.

    Last edited by little_froy; 06-21-2021 at 09:33.
    little_froy 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 11:49.


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