11.02.2011, 20:50
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':
Does anyone can suggest something?
pawn Код:
stock GetNewVehID()
{
for(new i = 1; i < MAX_BUYABLE_VEH; i++)
{
if(!vInfo[ivCreated[i]][vPrice]) return i;
}
return 255;
}