OnVehicleSpawn
#1

Is OnVehicleSpawn called before the car is respawned or after the callback is returned?
Reply
#2

proberly after its returned

i maybe wrong
Reply
#3

eh, I guess ill just test it :P
Reply
#4

The only reason why i think that is because if it dont return nothing
then the vehicle wont spawn because there is no vehicle id for it to spawn
Reply
#5

well this

pawn Код:
public OnVehicleSpawn(vehicleid)                        // OnVehicleSpawn
{
    new tmpowner = CarsOwner[vehicleid];
    new Float:tmpx, Float:tmpy, Float:tmpz, Float:tmpang;
    GetVehiclePos(vehicleid, tmpx, tmpy, tmpz);
    GetVehicleZAngle(vehicleid, tmpang);
    if(PlayerCar[tmpowner][x] != tmpx && PlayerCar[tmpowner][y] != tmpy && PlayerCar[tmpowner][z] != tmpz && PlayerCar[tmpowner][ang] != tmpang)
    {
      DestroyVehicle(vehicleid);
      CreateVehicle(
            PlayerCar[tmpowner][model],
            PlayerCar[tmpowner][x],
            PlayerCar[tmpowner][y],
            PlayerCar[tmpowner][z],
            PlayerCar[tmpowner][ang],
            PlayerCar[tmpowner][color1],
            PlayerCar[tmpowner][color2],
            60000
        );
    }
    return 1;
}                                        //----------
makes the car spawn where it was parked after it is blown up, so I am happy :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)