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

Little Question

$
0
0
Which one is good?

Code 1:
Code:


forward Function1(a);
public Function1(a) //It is a timer!
{
    new string[128];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(a == 1)
        {
            if(IsPlayerConnected(i))
            {
                format(string, sizeof(string), "Test");
                SendClientMessage(i, 0xFFFFFFFF, string);
            }
        }
    }
    return 1;
}

Code 2:
Code:


forward Function1(a);
public Function1(a) //It is a timer!
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(a == 1)
        {
            if(IsPlayerConnected(i))
            {
                new string[128];
                format(string, sizeof(string), "Test");
                SendClientMessage(i, 0xFFFFFFFF, string);
            }
        }
    }
    return 1;
}


Viewing all articles
Browse latest Browse all 18226

Trending Articles



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