Server crash with loop
Hi, I've been working on a plug-in for a while now and it is all working except one crucial element.
The plug-in itself shows a menu to each user as spawn for the first time, they can choose to let the server change some of their client settings or disconnect from the server. The problem is after the plug-in changes the settings(If they agree) they can change it back themselves using the console. At the moment the only compromise that I can do is change the settings during every freezetime, but if they want to they can change it back and play the round with the incorrect setting. I tried using a "while" loop and the server crashed. Is there a way to preform a constant check without crashing the server, or lock the command in some way so they cannot change it. PHP Code:
(If this is considered slow hacking then delete the post, I was under the impression its not slow hacking if they are told and agreed to it.) |
Re: Server crash with loop
Why do you use a while loop ? Because if you just wanna ask one person with it, it makes no sense.
|
Re: Server crash with loop
Quote:
Would it work better if I tried a "for" loop? |
Re: Server crash with loop
Quote:
|
Re: Server crash with loop
ye that would be much better something like that.
PHP Code:
|
Re: Server crash with loop
Quote:
PHP Code:
|
Re: Server crash with loop
So you want a plugin which turns the interp to 0.01 after they joined your server and agreed ?
|
Re: Server crash with loop
Hmm, I googled around abit and I'm still unsure as to how to register a forward, I found this method and it has worked.
PHP Code:
|
Re: Server crash with loop
Use one of the existing Cvar Checkers on these forums that ask for client permission to change cvars or to kick them if they don't agree.
|
Re: Server crash with loop
Using the code in #8 everything works but it is lagging the server(constant choke etc). Any suggestions to solve this?
|
| All times are GMT -4. The time now is 00:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.