Jump to content

Help - Resource functions


Recommended Posts

Hey!

I use a MTA DayZ Original (v0.5.5) gamemode, but I need to export functions of a resource for the gamemode. I can't post the code, not this time.

Code function from MTA DayZ gamemode:

client-side

function playerStatsClientSite() 
if getElementData(getLocalPlayer(),"logedin") then 
toggleControl ("radar",false) 
showPlayerHudComponent ("clock",false)  
showPlayerHudComponent ("radar",false) 
showPlayerHudComponent ("money",false)  
showPlayerHudComponent ("health",false)  
--showPlayerHudComponent ("weapon",false)  
--showPlayerHudComponent ("ammo",false)  
showPlayerHudComponent ("breath",false)  
if getElementData(getLocalPlayer(),"Map") >= 1  then 
    toggleControl ("radar",true) 
end 
if getElementData(getLocalPlayer(),"GPS") >= 1  then 
    showPlayerHudComponent ("radar",true)  
end 
if getElementData(getLocalPlayer(),"Watch") >= 1 then 
    showPlayerHudComponent ("clock",true)  
end 
end 
end 
setTimer(playerStatsClientSite,1000,0) 

But this part:

if getElementData(getLocalPlayer(),"GPS") >= 1  then 
    showPlayerHudComponent ("radar",true)  
end 

Need, rather than on / off the radar, it enable resource called hud. But if you do not have the GPS item, must stop the resource HUD.

Someone can help me?

SORRY FOR MY ENGLISH.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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