Raised This Month: $ Target: $400
 0% 

Server crash with loop


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
jasondoyle
Member
Join Date: Dec 2009
Old 05-10-2012 , 08:33   Server crash with loop
#1

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:
public Interp(id){
    new 
y=1;
    while ((
is_user_alive(id))){
        if(
== 1){
            
client_cmd(id"ex_interp ^"0.01^"0.01");
            
client_print(idprint_chat"Your ex_interp has been changed to 0.01");
        }
    }
    return 
PLUGIN_HANDLED;

Any ideas?



(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.
)

Last edited by ConnorMcLeod; 05-11-2012 at 02:44. Reason: restore
jasondoyle is offline
 


Thread Tools
Display Modes

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 00:22.


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