Pinda Posted May 18, 2010 Share Posted May 18, 2010 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
Callum Posted May 18, 2010 Share Posted May 18, 2010 Do you get any errors? Check by typing "/debugscript 3" in-game. Also, on the event handler I recommend you change getRootElement() to getResourceRootElement() Link to comment
Pinda Posted May 18, 2010 Author Share Posted May 18, 2010 i already /debugscript 3 i will test your line now Link to comment
Pinda Posted May 18, 2010 Author Share Posted May 18, 2010 dont work either : 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
50p Posted May 18, 2010 Share Posted May 18, 2010 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
Pinda Posted May 18, 2010 Author Share Posted May 18, 2010 I debugged it several times but nothing seems to help, what do you suggest, re-write the script? Link to comment
50p Posted May 18, 2010 Share Posted May 18, 2010 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
Pinda Posted May 19, 2010 Author Share Posted May 19, 2010 well if i debug no error message appear, seems that MTA cant find my resource Link to comment
50p Posted May 19, 2010 Share Posted May 19, 2010 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
Pinda Posted May 19, 2010 Author Share Posted May 19, 2010 yes i checked the cordinates a few times too, here is the spawning place. Link to comment
Pinda Posted May 19, 2010 Author Share Posted May 19, 2010 ow wait sorry i uploaded the wrong .zip Link to comment
Dark Dragon Posted May 19, 2010 Share Posted May 19, 2010 there is no script file in it. how is it supposed to do anything? Link to comment
Pinda Posted May 19, 2010 Author Share Posted May 19, 2010 sorry my mistake here it is Link to comment
50p Posted May 20, 2010 Share Posted May 20, 2010 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
Pinda Posted May 20, 2010 Author Share Posted May 20, 2010 but i dont want it to rotate, I just want that it is tilted Link to comment
50p Posted May 20, 2010 Share Posted May 20, 2010 but i dont want it to rotate, I just want that it is tilted Then read about moveObject function more... I guess you don't want to rotate it in one direction. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now