View Single Post
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