PDA

View Full Version : Running 1 or 2 timers in a public function?


Face9000
30/12/2011, 07:57 PM
Hello guys,i've this public function: (example).

public Anticheat()
(
if(health == 100.0)
{
SetTimer("HealthArmourCheat", 5000, true);
{
continue;
}
if(armour == 100.0)
{
SetTimer("HealthArmourCheat", 5000, true);
}
}
return 1;

This is a unique timer that has Health and Armour anticheat,this 2 has ONE single public/forward.
My question is: I need to run 1 for every "if" (2 same timers total) or just 1 timer globally?

Jefff
30/12/2011, 09:37 PM
One global or SetTimerEx for connected player

ғαιιοцт
30/12/2011, 11:53 PM
I'd run just one global timer that loops trough all olayers, checks if they are connected, and then checks if they are cheating.