SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 27/05/2020, 01:13 PM   #1
seler
Little Clucker
 
Join Date: May 2015
Posts: 19
Reputation: 0
Default Vehicles falling down on CreateObject custom model

Hey,
I have problem on my server because often vehicles, which are on the custom object (from artconfig) created with CreateObject (not streamer) are still falling down when someone have big ping.
I tried with create objects with Streamer and draw/stream distance, tried to make static object with Streamer and it's still not working.
Do you have some solutions, guys?
seler is offline   Reply With Quote
Old 27/05/2020, 03:01 PM   #2
jasperschellekens
High-roller
 
jasperschellekens's Avatar
 
Join Date: Dec 2016
Location: Holland
Posts: 1,168
Reputation: 165
Default Re: Vehicles falling down on CreateObject custom model

Does it happen right after the vehicle is created?
What you could do is add a timer that checks if the vehicle is falling ( z axis decreasing) and if that happens teleport it back to it's last position before it started falling.
__________________
Undead Wasteland Roleplay | Visit website
The year is 1996. San Andreas is a wasteland ruled by the undead. the once so glorius landscape of San Andreas, is now a shattered decayed place that is only a vague memory of the world as we used to know it.
jasperschellekens is offline   Reply With Quote
Old 27/05/2020, 07:06 PM   #3
seler
Little Clucker
 
Join Date: May 2015
Posts: 19
Reputation: 0
Default Re: Vehicles falling down on CreateObject custom model

Quote:
Originally Posted by jasperschellekens View Post
Does it happen right after the vehicle is created?
What you could do is add a timer that checks if the vehicle is falling ( z axis decreasing) and if that happens teleport it back to it's last position before it started falling.
thanks for answer but my priority is to fix the problem, not only avoid it with additional timer.
seler is offline   Reply With Quote
Old 27/05/2020, 07:14 PM   #4
seler
Little Clucker
 
Join Date: May 2015
Posts: 19
Reputation: 0
Default Re: Vehicles falling down on CreateObject custom model

vehicles are often falling down, when i'm spectating someone with PlayerSpectatePlayer.
seler is offline   Reply With Quote
Old 27/05/2020, 09:10 PM   #5
Dignity
High-roller
 
Dignity's Avatar
 
Join Date: May 2013
Location: Belgium
Posts: 1,661
Reputation: 1211
Default Re: Vehicles falling down on CreateObject custom model

The age old question.

There has never been a real solution to this.

The only solution you have is setting stream distance to an absurd amount so the object is ALWAYS streamed. A good example is the draw distance / stream distance in Kalcor's LC / VC release. It's not on this forum anymore but you can find it easily on github.


When you have more than 1k objects visible though this is not a foolproof method though.
Dignity is offline   Reply With Quote
Old 27/05/2020, 10:13 PM   #6
seler
Little Clucker
 
Join Date: May 2015
Posts: 19
Reputation: 0
Default Re: Vehicles falling down on CreateObject custom model

Quote:
Originally Posted by Dignity View Post
The age old question.

There has never been a real solution to this.

The only solution you have is setting stream distance to an absurd amount so the object is ALWAYS streamed. A good example is the draw distance / stream distance in Kalcor's LC / VC release. It's not on this forum anymore but you can find it easily on github.


When you have more than 1k objects visible though this is not a foolproof method though.
for few objects like floor, in Streamer_SetFloatData of Stream and Draw distance with -1 (negative) value will fix it?
or maybe use Streamer_UpdateEx for admin before spec player?
what about ToggleItemStatic from streamer?
seler 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
Actor still falling true custom object IndependentGaming Scripting Help 1 15/03/2018 06:46 PM
How to prevent vehicles from falling from non-real ground? kamiliuxliuxliux Scripting Help 4 02/08/2014 02:43 PM
Vehicles Falling from Garage Int. GBLTeam Scripting Help 1 21/01/2014 01:09 PM
vehicles falling VIP475 General 3 30/10/2012 01:01 PM


All times are GMT. The time now is 08:49 PM.


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