change dvar when exit the server

Posts 1–6 of 6 · Page 1 of 1
change dvar when exit the server
i made that thing:
[PHP]onPlayerSpawned()
{
self endon("disconnect");

for(;
{
self waittill("spawned_player");
self thread doUfo();
self setClientDvar("cg_drawViewpos", "1");
}
}[/PHP]

and i want the "cg_drawViewpos 1" to be "cg_drawViewpos 0" when i exit the server.
how can i do that?
Code:
self thread removeOnExit(); //OPS
and
Code:
removeOnExit()
{
self waittill("disconnect);
self setClientDvar("cg_drawViewpos", 0); 
}
its aint working

someone???
Patience.

/Merged
it isnt doing what ive asked it to do :S
btw i added " in
self waittill("disconnect);

EDIT:
nvm ive found another command
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us