Jump to content

oque ta errado aqui nessa entrega de drogas?


Recommended Posts

então ta dizendo que o argumento 2 do addEventHandler no server ta errado não to entendendo 
"expected element at argument 2 got nil"
lado server:
 

function MarkerEntregaFunction(thePlayer)
    if isPedInVehicle(thePlayer) then
        local ocupado = getPedOccupiedVehicle(thePlayer)
        if getElementData(thePlayer, "EntregadorD") == true and getElementData(ocupado, "kombiEntregas") == true then
            givePlayerMoney(thePlayer, 1000)
            destroyElement(MarkerEntrega)
            triggerClientEvent(thePlayer, "MarkerClientDrogas2", thePlayer)
            end
        end
    end
addEventHandler("onMarkerHit", MarkerEntrega, MarkerEntregaFunction)

lado client:

function MarkerClient()
    MarkerEntrega = createMarker(-1191.005859375,-1062.3449707031,129.21875 - 1, "cylinder", 2.5, 69, 69, 69)
end
addEvent("MarkerClientDrogas", true)
addEventHandler("MarkerClientDrogas", root, MarkerClient)

 

Edited by SciptNovato
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...