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 )