Jump to content

Como puedo


DefearT

Recommended Posts

Hola; perdon por hacer topic de nuevo:C

Pero alguien sabe como poner una imagen al sistema de AFK?

Funciona todo bien el AFK pero quisiera agregarle una Imagen para cuando este AFK?

Alguien me ayuda dejo el resource:

addEventHandler("onPlayerJoin",getRootElement(), 
function () 
setElementData(source,"afk_state","back") 
setElementData(source,"HideState","disabled") 
end) 
  
addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()), 
function () 
for i,v in pairs (getElementsByType("player")) do 
setElementData(v,"afk_state","back") 
setElementData(v,"HideState","disabled") 
end 
end) 
  
addCommandHandler("afk", 
function (thePlayer) 
if getElementData(thePlayer,"afk_state") == "back" then 
triggerClientEvent(thePlayer,"god_mode",thePlayer) 
setElementFrozen(thePlayer,true) 
setPlayerNametagText (thePlayer, "AFK" .. getPlayerName (thePlayer)) 
setElementData(thePlayer,"afk_state","afk") 
if getPedOccupiedVehicle(thePlayer) then 
fixVehicle(getPedOccupiedVehicle(thePlayer),true) 
setElementFrozen(getPedOccupiedVehicle(thePlayer),true) 
setVehicleDamageProof(getPedOccupiedVehicle(thePlayer),true) 
end 
elseif getElementData(thePlayer,"afk_state") == "afk" then 
setElementData(thePlayer,"afk_state","back") 
triggerClientEvent(thePlayer,"disable_god_mode",thePlayer) 
setElementFrozen(thePlayer,false) 
setPlayerNametagText (thePlayer, "AFK" .. getPlayerName (thePlayer)) 
if getPedOccupiedVehicle(thePlayer) then 
setElementFrozen(getPedOccupiedVehicle(thePlayer),false) 
setVehicleDamageProof(getPedOccupiedVehicle(thePlayer),false) 
end 
end 
end) 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...