Help with a stock...
#3

Quote:
Originally Posted by Pharrel
Посмотреть сообщение
pawn Код:
stock GetCarIDFromPlayer_Enum(playerid)
{
    for(new i=1; i<MAX_VEHICLES; i++)//if you use a sizeof you dont will get all the vehicles becouse you must have other cars before the owned vehicles...
    {
        if(!strcmp(CarInfo[i][vOwner], PlayerName(playerid),false)) return i;
    }
    return 0;
}

if(GetCarIDFromPlayer_Enum(playerid) == 0)//he dont have a car...
"//if you use a sizeof you dont will get all the vehicles becouse you must have other cars before the owned vehicles..." - Nah I only want it for owned vehicles...

if == 0 would work why doesn't == -1?
Reply


Messages In This Thread
Help with a stock... - by Jack_Leslie - 02.10.2011, 12:25
Re: Help with a stock... - by Pharrel - 02.10.2011, 12:32
Re: Help with a stock... - by Jack_Leslie - 02.10.2011, 12:35
Re: Help with a stock... - by Pharrel - 02.10.2011, 12:38
Re: Help with a stock... - by DRIFT_HUNTER - 02.10.2011, 12:59

Forum Jump:


Users browsing this thread: 1 Guest(s)