Raised This Month: $ Target: $400
 0% 

Optimizing Code


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Whitez
Member
Join Date: Apr 2016
Location: London, UK
Old 06-01-2016 , 12:34   Re: Optimizing Code
Reply With Quote #8

What about this?

PHP Code:
public my_function(id)
{
    
CurrentTime get_gametime()
    
    if(
UserChannelUsed[id][0] < CurrentTime)
    {
        
send message idchannel 0
        
        UserChannelUsed
[id][0] = CurrentTime 1.5)
    }
    else if(
UserChannelUsed[id][1] < CurrentTime)
    {
        
send message idchannel 1
        
        UserChannelUsed
[id][1] = CurrentTime 1.5)
    }
    else if(
UserChannelUsed[id][2] < CurrentTime)
    {
        
send message idchannel
        
        UserChannelUsed
[id][2] = CurrentTime 1.5)
    }
    else
    {
        return;
    }

Whitez 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 18:43.


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