Need help with plugin
2 Attachment(s)
Hi, I need help with my first plugin. When i play with it in "New game" (lan) it work fine :up: . But wen I open server with it :shock: :shock: Server got too many lags :| :cry: . If some one can help me - HELP PLZ :o
|
Re: Need help with plugin
The set_task() are set to be repeted forever at interval of 0.1 seconds. Server killers.
Too tired to fix it now... it can be done without those tasks .... |
Re: Need help with plugin
1 Attachment(s)
It don't help :| :?
|
Re: Need help with plugin
Ok..
set_lights is global. You only need to set it once i think (not every client connect) In startround you set two server_cmds. They won't get reset every round and you definately don't need to set them for every player. Just call these once along with set_lights on plugin_cfg or similar. Your main problem appears to be client_prethink. This gets run around 60 times per second per player and having that many things to do in there is what's causing your problems. Things to Change: - Add an is_user_alive(id) check to the start of prethink and return PLUGIN_HANDLED if they are dead. - The three terrorist client commands should be run on client_connect instead. -Pretty much everything else for terrorists can be run under curweapon (toggleclaws) as they will only change when weapon is changed/fired -Same with the ct thing. Curweapon will do fine. |
Re: Need help with plugin
Code:
Thx, but is still laging :roll: |
Re: Need help with plugin
You do This:
Code:
public client_PreThink(id)wouldn't it be better to do this if player spawns or also in roundstart? Btw.: for the correct hook on rountstart see VENs tutorial :http://forums.alliedmods.net/showthread.php?t=42159 Very nice tut! ;) |
Re: Need help with plugin
:shock: Too difficultly for me :shock:
|
Re: Need help with plugin
Quote:
|
| All times are GMT -4. The time now is 10:35. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.