Quote:
Originally Posted by thetwistedpanda
How about CreateTimer(1.0, DatTimer, client, TIMER_REPEAT) and keep a Float:g_fTimerCount[MAXPLAYERS + 1] increasing by 1.0 each iteration of the timer. If they're alive, increase g_fTimerCount. If they're dead, set g_fTimerCount back to 0.0 and wait for them to spawn. If g_fTimerCount >= CommandDelay, g_fTimerCount = 0, IssueCommand. Pesudodrunkocodo.
|
Can you write this out in code?
For example, if I already have:
Code:
public Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast) {
new client = GetClientOfUserId(GetEventInt(event, "userid"))
//Create the timer stuff here
}
public Action:whattodo(Handle:timer, any:user_index)
{
//Does whatever
}
What do I need to put within the
Even_PlayerSpawn meathod so that it executes
whattodo on the
client every few seconds.