Raised This Month: $ Target: $400
 0% 

Need help with plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
pRED*
Join Date: Dec 2006
Old 05-22-2007 , 17:10   Re: Need help with plugin
Reply With Quote #4

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.
pRED* is offline
 



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 10:35.


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