Jump to content

spawn bike


nk0zkh0z

Recommended Posts

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() 

Link to comment

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 
) 
  
  
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...