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(y == 1){
client_cmd(id, "ex_interp ^"0.01^"0.01");
client_print(id, print_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.)