Saving Vehicle to Interior.
#1

On my server I have a vehicle saving system, but...

I cant find anything like GetVehicleInterior or whatever.

And I'm wonder how could I save the interior that the vehicle is in?
Reply
#2

LinkVehicleToInterior maybe
Reply
#3

that puts a vehicle an interior..
Reply
#4

^ this
Reply
#5

Well a vehicle's interior will always be 0 unless you change it yourself... so justs keep a variable that changes with a vehicle's interior.

pawn Код:
new vInterior[MAX_VEHICLES];
stock SetVehicleInterior(vehicleid,interiorid)
{
    LinkVehicleToInterior(vehicleid,interiorid);
    vInterior[vehicleid]=interiorid;
}
stock GetVehicleInterior(vehicleid)return vInterior[vehicleid]=interiorid;
Or use those 2 functions in substitution to LinkVehicleToIntrior
Reply
#6

Nice, function, its been very useful =]
Reply
#7

Quote:
Originally Posted by SilentHuntR
Посмотреть сообщение
Well a vehicle's interior will always be 0 unless you change it yourself... so justs keep a variable that changes with a vehicle's interior.

pawn Код:
new vInterior[MAX_VEHICLES];
stock SetVehicleInterior(vehicleid,interiorid)
{
    LinkVehicleToInterior(vehicleid,interiorid);
    vInterior[vehicleid]=interiorid;
}
stock GetVehicleInterior(vehicleid)return vInterior[vehicleid]=interiorid;
Or use those 2 functions in substitution to LinkVehicleToIntrior
This functions should of come default with SA-MP they are way easier to use for some people. Great job on these btw even though they are simple :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)