nk0zkh0z Posted August 6, 2015 Posted August 6, 2015 I want to create a blip, when players step into that will give them a bike. I do like?
iMr.SFA7 Posted August 6, 2015 Posted August 6, 2015 Use createBlip createMarker "onClientMarkerHit" triggerServerEvent createVehicle -- ID 509
nk0zkh0z Posted August 6, 2015 Author Posted August 6, 2015 I need more. 60 seconds when the car down the vehicle will automatically disappear. tks Use createBlip createMarker "onClientMarkerHit" triggerServerEvent createVehicle -- ID 509
iMr.SFA7 Posted August 6, 2015 Posted August 6, 2015 I need more. 60 seconds when the car down the vehicle will automatically disappear. tks You can use setTimer destroyElement
nk0zkh0z Posted August 6, 2015 Author Posted August 6, 2015 OK I will try, thank you very much I need more. 60 seconds when the car down the vehicle will automatically disappear. tks You can use setTimer destroyElement
iMr.SFA7 Posted August 6, 2015 Posted August 6, 2015 OK I will try, thank you very much Ok,You are welcome.
nk0zkh0z Posted August 8, 2015 Author Posted August 8, 2015 I see something wrong. Check me. local marker = createMarker(-1247, -163, 13.14, "cylinder", 1.5, 0 ,255, 0, 155) function vehicle(thePlayer) if getElementType(thePlayer) == "player" then if isPedInVehicle(thePlayer)==true then return end if isElement( veh ) then destroyElement( veh ) end local x,y,z = getElementPosition(thePlayer) veh = createVehicle(510, x,y,z) warpPedIntoVehicle(thePlayer, veh) end end addEventHandler("onMarkerHit", marker, vehicle) function mainFunction() outputChatBox ("Xe đạp công cộng VNA[MTA:RP]") setTimer ( function() destroyElement (veh) end, 60000, 1 ) end mainFunction()
iMr.SFA7 Posted August 8, 2015 Posted August 8, 2015 local marker = createMarker(-1247, -163, 13.14, "cylinder", 1.5, 0 ,255, 0, 155) function vehicle(thePlayer) if isPedInVehicle(thePlayer) == true then return end if isElement( veh ) then destroyElement( veh ) end local x,y,z = getElementPosition(thePlayer) veh = createVehicle(510, x,y,z) warpPedIntoVehicle(thePlayer, veh) end addEventHandler("onMarkerHit", marker, vehicle) addEventHandler ("onClientResourceStart",resourceRoot, function () outputChatBox ("Xe đạp công cộng VNA[MTA:RP]") setTimer ( function() destroyElement (veh) end, 60000, 1 ) end )
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