Gtagasje Posted October 12, 2011 Share Posted October 12, 2011 I made a vehicle spawn script, which will create a vehicle when you enter a marker. The only thing is, I don't know how to warp the player into the vehicle.. I couldn't find it on the internet, and wiki also couldn't (My script isn't the same) so that's why I post it here. This is what I currently have: local vehicleMarker = createMarker(1552.33, -1605.37, 13, 'cylinder', 2.0, 255, 0, 0, 150 ) function vehicleMarkerHit ( hitElement, matchingDimension ) if getElementType ( hitElement ) == "player" and not isPedInVehicle (hitElement) then createVehicle ( 468, 1552.33, -1605.37, 13 ) end end addEventHandler( "onMarkerHit", vehicleMarker , vehicleMarkerHit ) Btw, if it's a failing script, say it.. this is one of my first scripts Greetz, Gtagasje Link to comment
arezu Posted October 12, 2011 Share Posted October 12, 2011 --server sided local vehicleMarker = createMarker(1552.33, -1605.37, 13, 'cylinder', 2.0, 255, 0, 0, 150 ) function vehicleMarkerHit ( hitElement, matchingDimension ) if getElementType ( hitElement ) == "player" and not isPedInVehicle (hitElement) then local vehicle = createVehicle ( 468, 1552.33, -1605.37, 13 ) warpPedIntoVehicle(hitElement, vehicle) end end addEventHandler( "onMarkerHit", vehicleMarker , vehicleMarkerHit ) Link to comment
Gtagasje Posted October 12, 2011 Author Share Posted October 12, 2011 Thank you very much. Also thanks for your fast reply . I tested it and it worked 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