Raised This Month: $ Target: $400
 0% 

Timer problems


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
uurbyrkdr
Senior Member
Join Date: Apr 2015
Old 06-15-2015 , 17:39   Timer problems
Reply With Quote #1

PHP Code:
public Action:Event_Round_Start(Handle:event, const String:name[], bool:dontBroadcast
{
    
iTime GetTime();
    
CreateTimer(60.0GodOff);
    for(new 
1i<=MaxClients;i++)
    {
        if(
IsClientInGame(i) && IsPlayerAlive(i))
            
SetEntProp(iProp_Data"m_takedamage"01);
    }
}

public 
Action:GodOff(Handle:timer)
{
    
int iRoundTime GetTime() - iTime;
    if(
iRoundTime == 60// Checking again time for bugs
    
{
        for(new 
1i<=MaxClients;i++)
        {
            
SetEntProp(iProp_Data"m_takedamage"21);
        }
        
CreateTimer(90.0GiveBeacon);
    }
}

public 
Action:GiveBeacon(Handle:timer)
{
    
int iRoundTime GetTime() - iTime;
    if(
iRoundTime == 150)
    {
        
ServerCommand("sm_beacon @all");
        
CreateTimer(90.0blabla...);
    }
}

... 
How can I optimize this code?
I know, i'm really a poor coder
uurbyrkdr is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode