PDA

View Full Version : Vehicles fall trough the floor.


Manuel4
05/04/2009, 01:55 PM
Hello,

I'm making a stunt server, which is already online.
Now, I've made a /speed stunt, which makes you spawn on top of the stunt, which is in the air

When you teleport there, the objects are not loaded yet, so the vehicles fall trough the floor, and you fall trough the floor as well When you do /speed after that, you'll be able to stand on the floor, but the cars aren't there anymore..

What can I do to fix this? I use MidoStreamer to stream my objects, and the load distance is "1000.0".

Thanks in advance.

gijsmin
05/04/2009, 02:08 PM
Use this: http://forum.sa-mp.com/index.php?topic=85795.0

Manuel4
06/04/2009, 08:08 PM
Hmm, I tried installing that on my server, but it didn't work. Since the server is working with Linux. I've tried it on my computer, and it perfectly worked, since I use Windows. Now, in the thread there is something said about converting some files to .so, I have no idea how.

gijsmin
06/04/2009, 08:56 PM
don't add the .so just add .dll

Manuel4
09/04/2009, 12:04 AM
I've contacted the server owner of serverffs, and he compiled my files. It's working now, thanks for your help!

ReV.
09/04/2009, 04:55 AM
You could also make the base CreateObject ;)

Beljulji
15/09/2012, 08:37 PM
i have the same problem i use y_less streamer and when i type like /stuntroad i fall down and cars too is there any way to fix it? is there any command or somthing like that that lock vehicle in the position until player get in the vehicle?

gtakillerIV
15/09/2012, 08:41 PM
Make sure to add the AddStaticVehicle first then the CreateObject.

Beljulji
15/09/2012, 08:53 PM
why addstaticvehicle why not createvehicle?

gtakillerIV
15/09/2012, 09:26 PM
Sorry I made a HUGE mistake it should be :-

Make sure to add the CreateObject first then the AddStaticVehicle/CreateVehicle.

Beljulji
15/09/2012, 09:36 PM
it is just like that OnGameModeInit is there any way to load objects faster?

HighFlyer
15/09/2012, 09:41 PM
There's two ways you can tackle this. Set a timer delaying the spawn of the cars or increase the Z axis of the cars a little bit higher.

Beljulji
15/09/2012, 09:43 PM
ok im not shure how to set timer can you give me an example? :D

burnuk
15/09/2012, 09:45 PM
set a timer for TogglePlayerControllable() when you teleport like 3-5 seconds so that the object around the player can load.

Beljulji
15/09/2012, 09:48 PM
whats the command for that?

Beljulji
15/09/2012, 09:53 PM
here is the command if (strcmp(cmdtext,"/stuntroad", true , 3 ) ==0)
{
SetPlayerPos(playerid,-804.0,-566.0,2189.0);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has joined /stuntroad.",pName);
SendClientMessageToAll(green,string);
SendClientMessage(playerid,pink,"Welcome To Stunt Road");
return 1;
}

burnuk
15/09/2012, 10:04 PM
here is the command if (strcmp(cmdtext,"/stuntroad", true , 3 ) ==0)
{
SetPlayerPos(playerid,-804.0,-566.0,2189.0);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has joined /stuntroad.",pName);
SendClientMessageToAll(green,string);
SendClientMessage(playerid,pink,"Welcome To Stunt Road");
return 1;
}

new freezeTimer = 4000; //4 seconds timer

//insert this on your teleport command
if (freezeTimer > 0)
{
// Don't allow the player to fall
TogglePlayerControllable(playerid, 0);
// Start a timer that will allow the player to fall again when the environment has loaded
SetTimerEx("freeze_Timer", freezeTimer, false, "ii", playerid);
}


forward freeze_Timer(playerid);
public freeze_Timer(playerid)
{
// Allow the player to move again (environment should have been loaded now)
TogglePlayerControllable(playerid, 1);

return 1;
}

xMaGmOtAnEtHx
15/09/2012, 10:04 PM
nice

Beljulji
15/09/2012, 10:05 PM
ty :D

Beljulji
15/09/2012, 10:11 PM
it works but when i falling down cars starting to fall down again any chance to fix that

burnuk
15/09/2012, 10:20 PM
did the objects load before you were unfreeze? if not try increase the freezetimer.

if your are teleporting with your car try increasing your z axis so that you are higher than the base.

Beljulji
15/09/2012, 10:40 PM
objects and cars are in the air i mean map is in the air but when im under that map i see cars starting to fall down when streamer stops showing objects cars starting to falling down. freezetimer is ok it shows cars and objects when im there but when im under it shows a lot of problems
car rain :D

Beljulji
15/09/2012, 10:42 PM
and how i can add when im freezen ongamemodetext 5,4,3,2,1 and im unfrozen