Jump to content

isElementWaitingForGroundToLoad (a nil value?)


Tails

Recommended Posts

Posted

Was working on a new map and found that my vehicles fall through the ground upon spawning. Figured I'd use isElementWaitingForGroundToLoad but I'm constantly getting this debug error: "attemp to call global: 'isElementWaitingForGroundToLoad' (a nil value)" I tried everything, even tried using the example code from the wiki page and it's still not working. I'm using MTA ver. 1.4-release-6882

Posted

This function returns true if MTA has frozen the element because it is above map objects which are still loading.

Maybe your game ain't freezing, that's why.

Also make you are using it in the correct side, if the vehicle spawns on client-side use it on client side.

Posted

Use onClientElementStreamIn and freeze the vehicle clientsided incase its ground arent loaded. Then check with a timer or smth, if the vehicle is still waiting on ground to load, if it isnt waiting then unfreeze the element and stop the timer.

Posted
The vehicles are in a .map file. How would I use it client-side if onVehicleRespawn is a server-side event?

Well one is to obtain the vehicles or send them client-side, (wich i do not know if it would work), other is creating them client side...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...