DarkMaan Posted November 21, 2015 Share Posted November 21, 2015 function startt () srandomveh() end addEventHandler("onResourceStart", getResourceRootElement(), startt) function srandomveh () local zahlm = math.random (1, 3) local portstring = pos[tonumber(zahlm)] local mX = gettok ( portstring, 1, string.byte(',') ) local mY = gettok ( portstring, 2, string.byte(',') ) local mZ = gettok ( portstring, 3, string.byte(',') ) ramarker = createMarker (mX, mY, mZ, "checkpoint", 2.25, 255,0,0) addEventHandler( "onMarkerHit", ramarker, newmarker) addEventHandler( "onMarkerHit", ramarker, randomveh) end function newmarker () destroyElement(ramarker) srandomveh() end SO function randomveh (thePlayer) if getElementType(thePlayer)=="player" then local veh = getPedOccupiedVehicle (thePlayer) local zahlv = math.random (1, 111) local x,y,z = getElementPosition (veh) setElementModel (veh, cars[zahlv]) local veh2 = getElementModel (veh) setElementPosition (veh , x, y, z+0.25) fixVehicle (veh) end end Link to comment
DarkMaan Posted November 21, 2015 Author Share Posted November 21, 2015 SCRIPT ERROR: DD-Build\marker.lua:139 '=' expected near 'function' Link to comment
SpecT Posted November 21, 2015 Share Posted November 21, 2015 What is that "SO" ? And which is 139 line ? Link to comment
DarkMaan Posted November 21, 2015 Author Share Posted November 21, 2015 is "SO" wrong? and '139' is 21 Link to comment
DarkMaan Posted November 21, 2015 Author Share Posted November 21, 2015 LOL, Thank you it works! 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