CreateDynamicObject problem
#1

I have some maps with vehicles in the sky on my server. I used createobject before and all was ok, but now i need createdynamicobject, because i have too many objects, and when i use it following bugs happen:

First of all, objects appear too slowly, and when player teleports to place in the sky, he falls down because objects appear after a few time, but when player teleports second time, this bug doesnt happen

Also, vehicles fall down too.

So how can i fix it?
Reply
#2

Quote:
Originally Posted by pasha97
Посмотреть сообщение
I have some maps with vehicles in the sky on my server. I used createobject before and all was ok, but now i need createdynamicobject, because i have too many objects, and when i use it following bugs happen:

First of all, objects appear too slowly, and when player teleports to place in the sky, he falls down because objects appear after a few time, but when player teleports second time, this bug doesnt happen

Also, vehicles fall down too.

So how can i fix it?
Yes that's a problem in Streamer you could use a timer for it. Make a SetTimerEx for a player and when he teleport freeze the player then unfreeze it let's say after 3 seconds so the objects get load before the player fall down (actually happened with me before)

Regards,
FalconX
Reply
#3

The objects aren't streaming in in-time. When you're teleporting the player, freeze them, and set a timer to unfreeze them.

Example with zcmd.
pawn Код:
CMD:teleport(playerid, params[])
{
    SetPlayerPos(playerid, 123.90, 53.980, 800.0);
    TogglePlayerControllable(playerid, 0); // Freeze them
    SetTimerEx("UnFreezeTimer", 3000, 0, "d", playerid); // Set a timer of 3000 milliseconds (3 secs)
    return 1;
}

forward UnFreezeTimer(playerid);
public UnFreezeTimer(playerid)
{
    TogglePlayerControllable(playerid, 1); // Unfreeze them
    return 1;
}
Reply
#4

thank you guys, repped
Reply
#5

but what about vehicles? I cant du such thing to them xD
Reply
#6

You might be able to, do they fall only when a player is teleported there, or do they fall when the gamemode is started?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)