Giving vehicles their own ID.
#1

Hello,

I really want to give vehicles their own unique ID. They must
keep the ID in any circumstances, like gamemode restart or
if I close and reopen the server again, they must keep the ID.

I want to make something like a dealership, that's why I want
this. Does someone have an idea or tip for how to make this?

Thanks.
Reply
#2

IF I understood what you meant, try something like this:

pawn Код:
new Car[10];

public OnGameModeInit()
{
//do NOT add any vehicles above
Car[0] = CreateVehicle(.....); //Vehicleid = 1, stays always same until you add other vehicles above these
Car[1] = CreateVehicle(.....); //Vehicleid = 2, stays always same until you add other vehicles above these
//And so on

}
I don't know was this what you're looking for, but at least I tried
Reply
#3

Quote:
Originally Posted by Jakku
Посмотреть сообщение
IF I understood what you meant, try something like this:

pawn Код:
new Car[10];

public OnGameModeInit()
{
//do NOT add any vehicles above
Car[0] = CreateVehicle(.....); //Vehicleid = 1, stays always same until you add other vehicles above these
Car[1] = CreateVehicle(.....); //Vehicleid = 2, stays always same until you add other vehicles above these
//And so on

}
I don't know was this what you're looking for, but at least I tried
Thanks for your reply, as I wanted to make a dealership, do you have a tip
for me how to use this to save it to a player, i'm using dini...

Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)