[Tutorial] [FIX] - un-attached objects on vehicles - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (
https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] [FIX] - un-attached objects on vehicles (
/showthread.php?tid=298417)
[FIX] - un-attached objects on vehicles -
JernejL - 20.11.2011
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);
}
}
}
|
Re: [FIX] - un-attached objects on vehicles -
Tanush123 - 20.11.2011
Nice job! This looks very useful
Re: [FIX] - un-attached objects on vehicles -
Luis- - 20.11.2011
Looks nice, I might use it when I start adding vehicle objects. Thanks.
Re: [FIX] - un-attached objects on vehicles -
Tanush123 - 20.11.2011
This will remove neons too?
Re: [FIX] - un-attached objects on vehicles -
FireCat - 20.11.2011
Wtf?
You could at least explain it --'
Re: [FIX] - un-attached objects on vehicles -
=WoR=G4M3Ov3r - 20.11.2011
Quote:
Originally Posted by FireCat
Wtf?
You could at least explain it --'
|
Its a "FIX" not an actual Tutorial..
Re: [FIX] - un-attached objects on vehicles -
FireCat - 20.11.2011
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.
Re: [FIX] - un-attached objects on vehicles -
JernejL - 20.11.2011
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..