This is efficient?
#1

Hello, I am making a system to get a random business, but I do not know if my code will be efficient.
In this I am looking for a business with certain characteristics so that it fits.

PHP код:
FindBusiness(playerid)
{
    new 
random(ValidBusiness); // Total business
    
    
if(BusinessData[i][bizExists] && BusinessData[i][bizType] >= && BusinessData[i][bizType] <= 4  && GetPlayerVirtualWorld(playerid) == BusinessData[i][bizExteriorVW] && GetPlayerInterior(playerid) == BusinessData[i][bizExterior])
    {
        if (
BusinessData[i][bizDeliver][0] != 0.0 && BusinessData[i][bizDeliver][1] != 0.0 && BusinessData[i][bizDeliver][2] != 0.0)
        {
            print(
"found!");
            return 
i;
        }
    }
    print(
"search again.");
    return 
FindBusiness(playerid);

Reply


Messages In This Thread
This is efficient? - by StreK - 02.05.2017, 06:47
Re: This is efficient? - by iLearner - 02.05.2017, 06:53
Respuesta: Re: This is efficient? - by StreK - 02.05.2017, 06:56
Re: This is efficient? - by iLearner - 02.05.2017, 06:57
Re: This is efficient? - by SyS - 02.05.2017, 06:58
Re: This is efficient? - by DRIFT_HUNTER - 02.05.2017, 07:31
Re: This is efficient? - by Duco - 02.05.2017, 09:13
Re: This is efficient? - by Logic_ - 02.05.2017, 10:20
Re: This is efficient? - by Vince - 02.05.2017, 15:17
Respuesta: Re: This is efficient? - by StreK - 02.05.2017, 22:50

Forum Jump:


Users browsing this thread: 2 Guest(s)