Doongogar Posted February 21, 2023 Share Posted February 21, 2023 (edited) 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 February 21, 2023 by SciptNovato Link to comment
Blaack Posted February 21, 2023 Share Posted February 21, 2023 Você está definindo a função de hit no lado server e criando o marker no lado client, obviamente isso não irá funcionar. 1 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