View Single Post
alasfourom
Senior Member
Join Date: Feb 2022
Location: Saudi Arabia
Old 07-15-2022 , 02:03   Re: Cumulative Timer
Reply With Quote #5

What kind of disaster I'm doing here ?

I created the float

PHP Code:
float f_AbilityStart [MAXPLAYERS+1]; 
The cumulative timer here

PHP Code:
public Action CumulativeEffect (int client)
{
    
f_AbilityStart[0] = GetEngineTime() + 10.0;
    
    if (
AbilityStart [client])
    {
        if (
f_AbilityStart [client])
        {
            
CreateTimer(0.1StopTimerclient);
        }
    }
    else 
AbilityStart [client] = true;
    return 
Plugin_Continue;

Timer Stop

PHP Code:
public Action StopTimer(Handle timerany client)
{
    
/*I stopped everything here*/
    
AbilityStart [client] = false;


Last edited by alasfourom; 07-15-2022 at 02:24.
alasfourom is offline