Quote:
Originally Posted by MadMaurice
sry teame06 buts its not that hte player isn't on the server but you should look at the line:
set_task(get_cvar_float(CVAR_GOD_TIME), "no_god", id)
the third parameter is the id of the task not the parameter that is givent to "no_god"
i would change this one into
set_task(get_cvar_float(CVAR_GOD_TIME), "no_god",57, id)
or another number than 57
if i helped plz submit +karma
|
You are wrong. The player can be disconnect from the server while the set_task is running. When the task is execute and set_user_mode native is used it throw a runtime error of invalid player because of a non-existing connected player. And this is what is happening not what you are thinking.
Code:
set_task(get_cvar_float(CVAR_GOD_TIME), "no_god", id)
There is no problem using that line like that. There is no problem with passing the player id in the task id.
[quote="MadMaurice"]
set_task(get_cvar_float(CVAR_GOD_TIME), "no_god",57, id)
or another number than 57[quote]
Secondly of all you used the 4th parmeter wrong too. The 4th parameter is an array you pass.
So you have to do
Code:
new something[2];
something[0] = id;
set_task(..., ..., ..., ..., something, 2);
Also if you you were going to remove the task later. You would do a unique task.
__________________