X-Tornado Posted April 12, 2009 Share Posted April 12, 2009 I did this script but my object didn't move qhen i type the command : /abrirbase . What's the problem? puertabase = createObject ( 2933, 2463.39, -1659.11, 14.0203, 0, 0, 270.675 ) function puertabaseopen() moveObject ( puertabase, 5000, 2463.26, -1650.36, 14.0203 ) addCommandHandler ( "abrirbase", puertabaseopen ) end Sorry for my english. I'm Spanish. Link to comment
Gamesnert Posted April 12, 2009 Share Posted April 12, 2009 The problem is pretty easy, it's just a little hard to get this in the start. You're saying to the computer: When function "puertabaseopen" is executed, then move object "puertabase" and add command "abrirbase" You need the command to execute, while you're creating the command while it's executed. Confusing isn't it? Solution is simple though: puertabase = createObject ( 2933, 2463.39, -1659.11, 14.0203, 0, 0, 270.675 ) -- Object is being created function puertabaseopen() -- Function is being created moveObject ( puertabase, 5000, 2463.26, -1650.36, 14.0203 ) end addCommandHandler ( "abrirbase", puertabaseopen ) -- Execute function puertabaseopen when "/abrirbase" has been typed I hope that should make it a little easier to understand. Link to comment
X-Tornado Posted April 12, 2009 Author Share Posted April 12, 2009 (edited) Thanks. Now it works Now, How can i make the time speed normal?. i changed the game time with the local time but the time go too quickly Edited April 13, 2009 by Guest Link to comment
J Konstantine Posted April 13, 2009 Share Posted April 13, 2009 Have a go first at least Link to comment
Gamesnert Posted April 13, 2009 Share Posted April 13, 2009 Time speed can be set in MTA 1.0, not in DP2.x yet. You'll have to wait for it. Or well, you can also set a 1 second forever looping timer which sets the time to what it's supposed to be, but the weather will generally mess up. 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