Use this:
local eventMarker = createMarker(2031.0009765625, -1417.849609375, 18, "arrow", 2.0, 0, 255, 0, 200)
addEventHandler("onPlayerMarkerHit", getRootElement(), theFunction)
And in the function add a check like this, to see if the marker that was hit is eventMarker:
theFunction (markerHit)
if markerHit == eventMarker then
--your code
end
end
local marker = {}
function Test()
marker[source] = createMarker(-1055.3283691406,-1679.3109130859,76,"cylinder",5.5,255,255,0,170 )
end
addEvent("Test", true)
addEventHandler("Test",root,Test)
function TestMarker(hitPlayer)
if source == marker[hitPlayer] then
exports.sidechat:outputSideChat ( "test", 255, 0, 0)
end
end
addEventHandler("onClientMarkerHit", root,TestMarker)
Try with this.
Yo te recomendaría en la medida de lo posible utilizar tablas. Utiliza elementData cuando necesites acceder a esos datos desde otro resource, o desde el otro lado (client-server).
Try with this:
BTNClose = guiCreateButton(234, 325, 95, 30, "Close", false, Window)
addEventHandler("onClientGUIClick", BTNClose, closeMain, false)
function closeMain()
if (guiGetVisible(Window) == true ) then
guiSetVisible(Window, false)
showCursor(false)
end
end
Don't do this.
Sure, liar, I read your post saying it was leaked from client side, I know it is bad but I really want this, etc...
Make one yourself and don't leak others' works.
Use this:
function respawnBus (thePlayer)
local model = getElementModel(source)
if model == 431 then
if not getVehicleOccupants (source) then
setTimer (function ()
respawnVehicle (source)
end, 5000, 1)
end
end
end
addEventHandler ("onVehicleExit", root, respawnBus)
você está em uma sessão Portuguesa. por favor, manter o Português... Obrigado
You're not a moderator and I also wrote my post in the best Portuguese I can speak, so shut the hell up
Thank you, rotts... WTF name?
vc não é um moderador e Eu escrivin o message tam ben como puiden, CALE-SE.
Obrigado rotts que nick pff Deus
He didn't steal anything, he posted an example from the Wiki.
Turbo, I'll give you an example which would work with the Wiki example you posted... Adding this line to the end of the code, the dx Text would disappear within 5 seconds after the resource is started.
setTimer(removeEventHandler,5000,1,"onClientRender", root, createText)