In my opinion, you provided too little information for us to help you, without us having to be all-encompassing. We need to know more specifically what you want help with.
"clien thing" and "I need to know how to do time triggered function like this: Function -> time -> new function/effect" are not very specific.
One very typical way to trigger a function at a given time is to use a timer entity.
You would have a function that you want executed at X time. Some where in the code you would create a timer entity to do that.
Code: Select all
local entity timer; // pointer to an entity
timer = spawn(); // entity is created; 'timer' now actually points to an entity
timer.nextthink = time + X;
timer.think = FunctionYouWantToRun; // think runs when time (>)= the current time + X
Inside FunctionYouWantToRun() you'll want to remove the timer entity, to free up the memory it occupies, as it is no longer needed. self will be the timer entity when that function runs. So, somewhere in that function you'll want:
remove(self);
Another way to trigger something at a given time is via a function that runs very often, like the player post and pre-think functions. You set a float variable for a given entity with the time you want that entity to do something. And during that fast iterating function somewhere you continuously check whether time has reached the time in that variable.
Check out the code that decides when it's time to take away 666/quad/biosuit effects.