Help regarding "CurWeapon"
Biohazard mode have this function:
PHP Code:
PHP Code:
My question is:Could this be implemented without the use of Curweapon? |
Re: Help regarding "CurWeapon"
Yes, most things can be done multiple ways. Why do you want to not use the CurWeapon event?
|
Re: Help regarding "CurWeapon"
I read everywhere that the function CurWeapon call very often and that can cause lag in game.
So I decided to changde/delete CurWeapon in every plugin. About this topic : many plugin I have reviewed on this forum but everywhere is used CurWeapon. Give me an example for this problem,how can I realize this please? |
Re: Help regarding "CurWeapon"
Well, you could use Ham Primary Attack i think, but it will be called almost as often as CurWeapon does...
I don't think the author of Biohazzard used it in that case because it was inefficient... |
Re: Help regarding "CurWeapon"
Ham Primary Attack=bad idea
I have in mind that this function does the occasion of each reload(every time when player reload weapon),but do not know how I can do that. |
Re: Help regarding "CurWeapon"
There is Ham_Weapon_Reload, and you can check the weapon's bullets there, but i think you will encounter bugs that way...
Stick to CurWeapon, i use it in over 10 plugins and i have 20-30% cpu usage on a heavy modified ZP 5.0 version... You are wasting time trying to optimize that code... Biohazzard has 2000 lines of code.. i got 10k only in nade modes plugin... |
Re: Help regarding "CurWeapon"
you don't have a good host server or what? i play on your server and i have allmost full fps / no lagg; some players have a bad internet connection and they are moving in "teleporting mode" ))); and yes this depends on a good configuration off plugins; about eating cpu/net packets/net bandwidth space - if you have a low bandwidth this may cause lag to players/ 15 players - 15 slots - more bandwidth and fast data packet sender to client side; some net packets drop it and that information never come to player = this make the screen freeze for a ms/short time; these errors can affect cpu and make it highter; are few zombie servers full of plugins installed and well customized - they don't have any problems with lag or fps;
when you write in console "developer 1" you will see you have an repeating error from a weapon, this flood the backgroung of the client console and eat some of his fps! |
Re: Help regarding "CurWeapon"
curweapon is called when the hud info regarding wep is changed
that means it will be called for every shot you take, every reload and when you switch weps since your code is about bullets, there is no better function for that |
| All times are GMT -4. The time now is 22:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.