Cookiez Posted February 2, 2012 Share Posted February 2, 2012 Im a begginer scrpter, and i know that u guys will say this is all wrong... D: It was suppost to appear a bmx on VEHICLE_POSITION coordinates e.e Help me, if u can xDD local VEHICLE_POSITION = { -3992.5, 390.79998779297, 3.5999999046326} local MARKER_POSITION = { -3763.099609375, 475.19921875, 4.5} function createTheMarker() local x, y, z = unpack(MARKER_POSITION) local marker1 = createMarker( x, y, z, "corona", 1, 0, 255, 0, 255) end addEventHandler("onResourcesStart",getRootElement(),createTheMarker) function IfMarkerHit(hitplayer) if hitplayer ~= source then return end if source == marker1 then local x1, y1, z1 = unpack(VEHICLE_POSITION) local vehicle1 = createVehicle(481 , x1, y1, z1) end end addEventHandler("onMarkerHit",getResourceRootElement(getThisResource()),IfMarkerHit) Link to comment
JR10 Posted February 2, 2012 Share Posted February 2, 2012 local VEHICLE_POSITION = { -3992.5, 390.79998779297, 3.5999999046326} local MARKER_POSITION = { -3763.099609375, 475.19921875, 4.5} local marker1 function createTheMarker() local x, y, z = unpack(MARKER_POSITION) marker1 = createMarker( x, y, z, "corona", 1, 0, 255, 0, 255) end addEventHandler("onResourceStart",resourceRoot,createTheMarker) function IfMarkerHit(hitplayer) local x1, y1, z1 = unpack(VEHICLE_POSITION) local vehicle1 = createVehicle(481 , x1, y1, z1) end addEventHandler("onMarkerHit",marker1,IfMarkerHit) 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