Static vehicles not affected by OnVehicleSpawn?
#1

I've got a bit of code on OnVehicleSpawn that is not working on vehicles I spawn using AddStaticVehicle, every other vehicle spawned (/spawnvehicle, CreateVehicle, ect) is working correctly and calls the callback, but AddStaticVehicle refuses to. Has anyone else noticed this?

pawn Код:
public OnVehicleSpawn(vehicleid)
{
    SetVehicleParamsEx(vehicleid, 0, 0, 0, 0, 0, 0, 0);
    return 1;
}
Reply
#2

Why are you turning off the engine and lights when a vehicle respawns?
Respawning a vehicle does that by default.
Even a blown up vehicle is restored to it's original state as it was when it was created.
Reply
#3

Quote:
Originally Posted by PowerPC603
Посмотреть сообщение
Why are you turning off the engine and lights when a vehicle respawns?
Respawning a vehicle does that by default.
Even a blown up vehicle is restored to it's original state as it was when it was created.
In my experience, that's not the case.
Reply
#4

OnVehicleSpawn is actually a misleading name. It should be called OnVehicleRespawn, as it is not called with the initial spawn.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)