Code: Show/Hide if(true) --seconds remaning |
tcsoccerman wrote: |
I've found a way, i just don't know what the call back is for when someone is IN the zone. not entering. this is not what i want at all. |
Code: Show/Hide local int timer(void *arena_)
{ Arena *arena = arena_; struct adata *ad = P_ARENA_DATA(arena, adkey); //count players here, etc return 1; } EXPORT int MM_halo_hill(int action, Imodman *mm_, Arena *arena) { ... else if (action == MM_ATTACH) { ml->SetTimer(timer, 500, 100, arena, arena); } else if (action == MM_DETACH) { ml->ClearTimer(timer, arena); } |
Smong wrote: |
The key in SetTimer is so you can cancel a specific timer. You might want to do this when the module detaches, to clean up neatly. In this case setting the key to be the arena is a good idea. You don't have to use a key if you don't need to, but if your module detaches/unloads and any running timers are not stopped could crash the server. |