Jump to content

failed to create object


Pinda

Recommended Posts

function resource_starts ()
object1 = createObject ( 8838, 3408.680664, -2106.466064, -4.48817, 0.015000, 1.500000, 0.000000 )
move1_1 ()
end
addEventHandler ( "onResourceStart", getRootElement(), resource_starts )
 
function move1_1 ()
moveObject ( object1, 5000, 3408.680664, -2106.466064, -8.38814, 0.015000, 1.500000, 0.000000 )
setTimer ( move1_2, 10000, 1 )
end
 
function move1_2 ()
moveObject ( object1, 5000, 3408.680664, -2106.466064, -4.48817, 0.015000, 1.500000, 0.000000 )
setTimer ( move1_1, 10000, 1 )
end

it doesnt even create the object :(

Link to comment

dont work either : :shock:

i will post my meta with it but i dont think thats the problem

<?xml version="1.0" encoding="utf-16"?>
<meta>
<info type="map" gamemodes="race" name="Assassin door rije kut aap" />
<script src="kutaap.lua" type="server" />
<map src="Assassin door rije kut aap.map" />
<settings>
<setting name="#respawn" value="timelimit" />
settings>
meta>

Link to comment

If you checked /debugscript 3 and you didn't see any error/warning message then it must be something wrong with the script.

Since your script is small, try to debug it and check if the onResourceStart event is triggered. If it's not called try "debugscript 3" command again because your script looks fine.

Link to comment

What do you mean "nothing seems to help"? Don't you see any message when trying to start the resource? Give us a link to your entire resource or remake the script if you want. Everything looks fine to me.. I'm just worried that server doesn't tell you that something is wrong with the resource.

Check the spelling of your script and the one in meta.xml. Also, check map file name. Try to name the file without spaces.

Link to comment
well if i debug no error message appear, seems that MTA cant find my resource

Where do you expect models to spawn?

I just checked, and the objects are where they are supposed to be (somewhere out of Los Santos) at the level of the water. So I don't know what your problem is? I also started the map with race gamemode and I spawn at the quarry (Las Venturas).

Make sure the coords are correct.

Link to comment

As I said, check the coords and rotations. The object is spawned where you tell it to. The problem is you messed up the rotation values.

On createObject line, change the Y rotation value from 1.5 to 90 and you will see the difference. And if you have rotation in moveObject function, it will rotate your object every time you move it and eventually it will spin around.

If you rotate it by 1.5 every 10 seconds, it will rotate 360 within 2 minutes.

Link to comment

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...