Quote:
Originally Posted by Diegorkable
It's better if you register a forward. think that each loop is occuring at every possible milisecond (I dont really know the times but it's very fast), so this is killing the server's CPU, making it crash. A forward will be called with a delay. Try to find the right forward to call that and make sure that if player agreed that his settings will be saved, it will be kept in a boolean array (true:agreed, false:did not agree).
|
I tried to user a "for" loop and it almost works, it is only changing the command when the trigger an event(spawn, take damage etc).
PHP Code:
public ClientCommands(id){
new y;
if(is_user_alive(id)){
y=1;
}else{
y=0;
}
for (y=1; y==1; y+-){
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;
}
I would like to try use a forword but I have no idea how, could you link me to a tutorial or anything?