Chaz-CR Posted July 27, 2013 Share Posted July 27, 2013 What's the problem here? function ChazShowLabel (hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then LabelChaz = guiCreateLabel(0.22, 0.33, 0.59, 0.08, "Haz Modificado Tu Vehiculo!", true) guiSetFont(LabelChaz, "sa-gothic") guiLabelSetColor(LabelChaz, 11, 11, 160) end end addEventHandler("onClientMarkerHit", marker, ChazShowLabel) setTimer( ChazShowLabel, 2000, 1) function desaparecer() destroyElement( ChazShowLabel ) end Link to comment
iMr.3a[Z]eF Posted July 27, 2013 Share Posted July 27, 2013 local LabelChaz = guiCreateLabel(0.22, 0.33, 0.59, 0.08, "Haz Modificado Tu Vehiculo!", true) guiSetFont(LabelChaz, "sa-gothic") guiLabelSetColor(LabelChaz, 11, 11, 160) guiSetVisible(labelChaz, false) function ChazShowLabel (hitElement) if hitElement == localPlayer then setTimer(guiSetVisible(labelChaz, true), 2000, 1) end end addEventHandler("onClientMarkerHit", marker, ChazShowLabel) Link to comment
DNL291 Posted July 27, 2013 Share Posted July 27, 2013 addEventHandler( "onClientResourceStart", resourceRoot, function() LabelChaz = guiCreateLabel(0.22, 0.33, 0.59, 0.08, "Haz Modificado Tu Vehiculo!", true) guiSetFont(LabelChaz, "sa-gothic") guiLabelSetColor(LabelChaz, 11, 11, 160) guiSetVisible(LabelChaz, false) end ) function ChazShowLabel (hitElement) if (getElementType(hitElement) == "player") and (guiGetVisible(LabelChaz) == false) then guiSetVisible(LabelChaz, true) setTimer(guiSetVisible, 2000, 1, LabelChaz, false) end end addEventHandler("onClientMarkerHit", marker, ChazShowLabel) Try it. Link to comment
Chaz-CR Posted July 28, 2013 Author Share Posted July 28, 2013 It works, thanks a lot friend! 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