Vehicle ownership.
#2

You have to get the vehicle IDs AFTER you spawn the vehicles, let me help you.
pawn Code:
new autohauscars[41];

//Where you spawn the vehicles:
autohauscars[0] = CreateVehicle(//first vehicle)
autohauscars[1] = CreateVehicle(//second vehicle, etc.)
//Until autohauscars[41] = CreateVehicle(.

IsAutohausCar(carid)
{
    new g;
    for(g=0; g<41; g++)
    {
        if(autohauscars[g] == carid) return g;
    }
    return -1;
}
This code should work perfectly if you edit the CreateVehicles as I told you to.
Reply


Messages In This Thread
Vehicle ownership. - by eFlex - 14.12.2012, 14:45
Re: Vehicle ownership. - by maramizo - 14.12.2012, 14:59
Re: Vehicle ownership. - by eFlex - 14.12.2012, 15:07
Re: Vehicle ownership. - by maramizo - 14.12.2012, 15:27
Re: Vehicle ownership. - by eFlex - 14.12.2012, 21:23

Forum Jump:


Users browsing this thread: 2 Guest(s)