OnVehicleSpawn() bug
#1

SetVehicleZAngle() seems to have no effect in OnVehicleSpawn().

Example code:

pawn Code:
public OnVehicleSpawn(vehicleid)
{
    if (OwnedVehicles[vehicleid])
    {
        new vid = OwnedVehicles[vehicleid];
        SetVehicleZAngle(vehicleid, vehicles[vid][cr]);
        SetVehiclePos(vehicleid, vehicles[vid][cx], vehicles[vid][cy], vehicles[vid][cz]);
    }
    else
    {
        Fuel[vehicleid] = MAX_FUEL;
    }
    return 1;
}
Vehicle angle was the same as when it was first spawned. When I'm trying to load it's position where it was last parked, the position is set correctly, but angle isn't. When using another function to load vehicle position from these variables, it works correctly.
Reply


Messages In This Thread
OnVehicleSpawn() bug - by mick88 - 02.03.2011, 09:11
Re: OnVehicleSpawn() bug - by xxmitsu - 02.03.2011, 09:25
Re: OnVehicleSpawn() bug - by Raz0r1000 - 02.03.2011, 11:06
Re: OnVehicleSpawn() bug - by mick88 - 02.03.2011, 12:54
Re: OnVehicleSpawn() bug - by GaGlets(R) - 02.03.2011, 13:57
Re: OnVehicleSpawn() bug - by Finn - 23.03.2011, 20:58

Forum Jump:


Users browsing this thread: 1 Guest(s)