UNIQUE id for vehicle.
#1

Hi again, i use a new vehicle system( https://sampforum.blast.hk/showthread.php?tid=222233 ) and i have a problem with that. When i make a car to be bought, it saves it to database perfectly. But if i wan't to make antoher vehicle it makes the same vehicleid. Here is the function which mades a 'unique id for a new spawned car':
pawn Код:
stock GetNewVehID()
{
    for(new i = 1; i < MAX_BUYABLE_VEH; i++)
    {
        if(!vInfo[ivCreated[i]][vPrice]) return i;
    }
    return 255;
}
Does anyone can suggest something?
Reply


Messages In This Thread
UNIQUE id for vehicle. - by ajwar - 11.02.2011, 20:50
Re: UNIQUE id for vehicle. - by dice7 - 11.02.2011, 21:14
Re: UNIQUE id for vehicle. - by ajwar - 11.02.2011, 21:20

Forum Jump:


Users browsing this thread: 1 Guest(s)