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
#2

I guess you already have 255 cars on your server ?
Reply
#3

I have just one car
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)