Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Max Limit Looping every 1 Second ?

$
0
0
Dears ,

I wanna know what is the max number can i loop in one second ?

Situation:

I have created a system which is based on the game-time-in-seconds such as:

PHP Code:

public OnGameModeInit()
{
    
SetTimer("ClockTimerSystem",1000,true);
    return 
1;
}

forward ClockTimerSystem();
public 
ClockTimerSystem()
{
    
//code of updating time ..
    // ..
    // ..
    // ..
    // ..
    
    
for(new 0< ??; i++) // I'm checking for about 400 variables
    
{
        if(
Variable[i] == 0) continue;
        
        
// Big Code includes (UPDATE statement of MySQL)
        // ..
        // ..
        // ..
        
    
}
    return 
1;


Everything is working fine, but the system stills new and most of the variables are equal to 0
I don't know if this will cause a lag to the server if the 400 variables were equal to 1

Do you have any advice, or leaving it like this ?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>