Fury Posted February 21, 2013 Posted February 21, 2013 hey guys, i have a problem with createObject. i have a moving object which players can move it by touching with car. my problem is every player has a different object. i mean there is one object created by createObject function, but movement of the object is different for every player. how can i make a "object with a server-side movement"? i hope you get what i am saying. thanks Destruction Derby
Castillo Posted February 21, 2013 Posted February 21, 2013 I don't really understand what do you mean, how could the movement be different if the object is server side? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Fury Posted February 21, 2013 Author Posted February 21, 2013 (edited) I don't really understand what do you mean, how could the movement be different if the object is server side? well i dont know too but it is. by the way im not using any function to move the object. edit: if i can use moveObject(server-side) when car touches the object it can be the same movement for every player. am i right? Edited February 21, 2013 by Guest Destruction Derby
NodZen Posted February 21, 2013 Posted February 21, 2013 I don't really understand what do you mean, how could the movement be different if the object is server side? well i dont know too but it is. by the way im not using any function to move the object. edit: if i can use moveObject when car touches the object it can be the same movement for every player. am i right? Put your script. ------------------------------------------------------------------------------------------ My scripts http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977 http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740
Fury Posted February 21, 2013 Author Posted February 21, 2013 I don't really understand what do you mean, how could the movement be different if the object is server side? well i dont know too but it is. by the way im not using any function to move the object. edit: if i can use moveObject when car touches the object it can be the same movement for every player. am i right? Put your script. i know its not usable but the idea of moving object in server-side seems to workable: top = createObject ( 1222, 66, -4038.732421875, 21) top_arena = createColRectangle ( 66, -4038.732421875, 1, 50 ) function onPlayerTouchesTheBall(source) local x,y,z = getElementPosition( top ) moveObject ( top, 1000, x+10, y+10, z+2 ) end addEventHandler ( "onColShapeHit", top_arena, onPlayerTouchesTheBall ) is there a any function that detects when one object touches another object? Destruction Derby
Moderators IIYAMA Posted February 22, 2013 Moderators Posted February 22, 2013 Not really, but there is something called: https://wiki.multitheftauto.com/wiki/ProcessLineOfSight Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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