SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 20/11/2011, 03:58 PM   #1
JernejL
Beta Tester
 
JernejL's Avatar
 
Join Date: Jan 2006
Location: Slovenia
Posts: 580
Reputation: 418
Default [FIX] - un-attached objects on vehicles

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);
}
}


}
__________________
Please, do no message me anymore, i'm no longer part of sa-mp scene.

I will not reply to private messages.
JernejL is offline   Reply With Quote
Old 20/11/2011, 04:05 PM   #2
Tanush123
High-roller
 
Tanush123's Avatar
 
Join Date: Aug 2011
Posts: 1,022
Reputation: 65
Default Re: [FIX] - un-attached objects on vehicles

Nice job! This looks very useful
Tanush123 is offline   Reply With Quote
Old 20/11/2011, 04:09 PM   #3
Luis-
High-roller
 
Luis-'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 3,926
Reputation: 401
Default Re: [FIX] - un-attached objects on vehicles

Looks nice, I might use it when I start adding vehicle objects. Thanks.
__________________


| Home | Server | Forum | Trailer |
Luis- is offline   Reply With Quote
Old 20/11/2011, 04:10 PM   #4
Tanush123
High-roller
 
Tanush123's Avatar
 
Join Date: Aug 2011
Posts: 1,022
Reputation: 65
Default Re: [FIX] - un-attached objects on vehicles

This will remove neons too?
Tanush123 is offline   Reply With Quote
Old 20/11/2011, 04:15 PM   #5
FireCat
High-roller
 
FireCat's Avatar
 
Join Date: Jul 2010
Posts: 2,322
Reputation: 609
Default Re: [FIX] - un-attached objects on vehicles

Wtf?
You could at least explain it --'
FireCat is offline   Reply With Quote
Old 20/11/2011, 04:22 PM   #6
=WoR=G4M3Ov3r
High-roller
 
Join Date: Nov 2010
Location: www.Ambrosia-Servers.com
Posts: 1,751
Reputation: 329
Default Re: [FIX] - un-attached objects on vehicles

Quote:
Originally Posted by FireCat View Post
Wtf?
You could at least explain it --'
Its a "FIX" not an actual Tutorial..
=WoR=G4M3Ov3r is offline   Reply With Quote
Old 20/11/2011, 04:23 PM   #7
FireCat
High-roller
 
FireCat's Avatar
 
Join Date: Jul 2010
Posts: 2,322
Reputation: 609
Default Re: [FIX] - un-attached objects on vehicles

Quote:
Originally Posted by =WoR=G4M3Ov3r View Post
Its a "FIX" not an actual Tutorial..
He still should explain a bit, and tell others to create those vars.
FireCat is offline   Reply With Quote
Old 20/11/2011, 06:32 PM   #8
JernejL
Beta Tester
 
JernejL's Avatar
 
Join Date: Jan 2006
Location: Slovenia
Posts: 580
Reputation: 418
Default Re: [FIX] - un-attached objects on vehicles

Quote:
Originally Posted by FireCat View Post
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..
__________________
Please, do no message me anymore, i'm no longer part of sa-mp scene.

I will not reply to private messages.
JernejL is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Object Editor for objects attached to vehicles? Antonio [G-RP] Help Archive 1 01/03/2011 09:50 PM
[BUG] Attached objects jonrb Help Archive 3 02/12/2010 10:53 PM


All times are GMT. The time now is 02:37 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.