[Tutorial] [FIX] - un-attached objects on vehicles
#1

If a vehicle blows up & respawns outside player's streaming radius, the object attached on vehicles stay where the vehicle was before.

You can workaround this problem with a simple onvehiclespawn fix like this:

Quote:

OnVehicleSpawn(VehicleID) {

for (new L = 0; L < PVS_MAX_VEHICLE_ATTACHOBJS; L++) {
if (pvs_Vehicles[VehicleID][PEV_ATTACHOBJS][L] != INVALID_OBJECT_ID) { // has a attached object in this slot
SetObjectPos(pvs_Vehicles[VehicleID][PEV_ATTACHOBJS][L], 0.0, 0.0, -100.0);
}
}


}

Reply
#2

Nice job! This looks very useful
Reply
#3

Looks nice, I might use it when I start adding vehicle objects. Thanks.
Reply
#4

This will remove neons too?
Reply
#5

Wtf?
You could at least explain it --'
Reply
#6

Quote:
Originally Posted by FireCat
Посмотреть сообщение
Wtf?
You could at least explain it --'
Its a "FIX" not an actual Tutorial..
Reply
#7

Quote:
Originally Posted by =WoR=G4M3Ov3r
Посмотреть сообщение
Its a "FIX" not an actual Tutorial..
He still should explain a bit, and tell others to create those vars.
Reply
#8

Quote:
Originally Posted by FireCat
Посмотреть сообщение
He still should explain a bit, and tell others to create those vars.
FFS, that was just explanation on how to fix it + an example, it wasn't meant to be functional code..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)