coolboy-JNRNS Posted July 25, 2009 Share Posted July 25, 2009 Hi, i have a code for client side to spawn a vehicle and i don't know what to put in the server side, I was reading on the wiki and it said "Important Note: Vehicles created client side are only seen by the client that creates, them, aren't synced and players cannot enter them. They are essentially for display only" and this i and i gui button. function spawn2(button,state) if button == "left" and state == "down" then local source = getLocalPlayer() -- get the local player local x, y, z = getElementPosition ( source ) -- retrive the player's position createVehicle ( 429 , x + 5, y + 5 , z + 2 ) end end addEventHandler ( "onClientGUIClick", Button[8], spawn2 ) Link to comment
50p Posted July 25, 2009 Share Posted July 25, 2009 http://development.mtasa.com/index.php? ... ng_the_GUI Link to comment
DiSaMe Posted July 25, 2009 Share Posted July 25, 2009 Do you mean you want to spawn a server-side vehicle by using GUI? http://development.mtasa.com/index.php? ... erverEvent 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