waqaarali Posted May 20, 2014 Share Posted May 20, 2014 CLIENT SIDE local vehicleMarker = createMarker(1032.47998, -1032.34766, 31.1,"cylinder",1,255,255,255) function vehicleGUI() vehicleGUI = guiCreateWindow(277, 204, 268, 223, "Vehicle Spawn", false) guiWindowSetSizable(vehicleGUI, false) vehicleOne = guiCreateButton(9, 31, 250, 50, "Faggio", false, vehicleGUI) vehicleBMX = guiCreateButton(9, 95, 250, 50, "BMX", false, vehicleGUI) vehicleMountain = guiCreateButton(9, 162, 250, 50, "Mountain Bike", false, vehicleGUI) if source == vehicleMarker then guiSetVisible(vehicleGUI, true) showCursor( true ) end end addEventHandler("onClientMarkerHit",getRootElement(),vehicleGUI) function vehicleOne( player ) if source == vehicleOne then local playerspawn = getLocalPlayer() local x, y, z = getElementPosition ( playerspawn ) createVehicle ( 462, x, y, z + 5 ) guiSetVisible(vehicleGUI,false) showCursor( false ) end end addEventHandler("onResourceStart",getRootElement(),vehicleOne) I can't spawn the vehilce when i press the button No errors come up either. Link to comment
waqaarali Posted May 20, 2014 Author Share Posted May 20, 2014 I am soo stupid thanks Link to comment
waqaarali Posted May 20, 2014 Author Share Posted May 20, 2014 I can make vehicles but i can't enter them why ? Link to comment
Karuzo Posted May 20, 2014 Share Posted May 20, 2014 You have to create the vehicles server sided 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