Claus Posted July 28, 2019 Share Posted July 28, 2019 [SERVERSIDE] function hitMarkerEntrada (player, matchingDimension) if getElementType(player) == "player" and not (getPedOccupiedVehicle(player)) and matchingDimension then if not isGuestAccount( getPlayerAccount(player)) then setElementData( player, 'marker_home_entrada', getElementData(source, 'info_marker')[1]) setElementFrozen(player, true) onPlayerPisar(player, source) end end end addEventHandler("onMarkerHit", marker_entrada, hitMarkerEntrada) function onPlayerPisar (player, marker_entrada) local id = getElementData (marker_entrada, "info_marker")[1] local dueno = getElementData (marker_entrada, "info_marker")[2] local creador = getElementData (marker_entrada, "info_marker")[3] local interior = getElementData (marker_entrada, "info_marker")[16] local dimension = getElementData (marker_entrada, "info_marker")[17] local precio = getElementData (marker_entrada, "info_marker")[18] local door = getElementData (marker_entrada, "info_marker")[19] if getElementData (player, "Duty") then setTimer(triggerClientEvent, 500, 1, player, 'abrirPanelCasaMOD', player,id,dueno,creador,interior,dimension,precio,door,marker_entrada) else if dueno == getPlayerName (player) then setTimer(triggerClientEvent, 500, 1, player, 'abrirPanelCasaDueno', player,marker_entrada) elseif dueno == "Nadie" then setTimer(triggerClientEvent, 500, 1, player, 'abrirPanelCasaSinDueno', player,marker_entrada) elseif dueno ~= "Nadie" then setTimer(triggerClientEvent, 500, 1, player, 'abrirPanelCasaConDueno', player,marker_entrada) end end end Al tener este código los triggers se ejecutan dos veces ¿Puede explicarme alguien porqué? El debug no suelta ningún problema, solo que la función en el cliente luego se ejecuta dos veces 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