LordLinderberg Posted March 13, 2014 Posted March 13, 2014 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.
pa3ck Posted March 13, 2014 Posted March 13, 2014 You will need to modify your hud resource. If you want us to help you in that, you should post the script(s).
LordLinderberg Posted March 13, 2014 Author Posted March 13, 2014 You will need to modify your hud resource. If you want us to help you in that, you should post the script(s). This is the gamemode hud script. But I don't want to activate the radar, but activate the another resource called Hud.
pa3ck Posted March 13, 2014 Posted March 13, 2014 I understand that, but if you want to toggle a custom radar, you will need to edit that.
LordLinderberg Posted March 13, 2014 Author Posted March 13, 2014 I understand that, but if you want to toggle a custom radar, you will need to edit that. Can I send to you from private?
LordLinderberg Posted March 13, 2014 Author Posted March 13, 2014 Sure. Thanks, I waiting for your answer.
Gallagher Posted March 13, 2014 Posted March 13, 2014 if getElementData(getLocalPlayer(),"GPS") >= 1 then showPlayerHudComponent ("radar",false)
LordLinderberg Posted March 13, 2014 Author Posted March 13, 2014 if getElementData(getLocalPlayer(),"GPS") >= 1 then showPlayerHudComponent ("radar",false) That only disable the radar... I need start the Hud resource. PS: Hud is a resource name.
pa3ck Posted March 13, 2014 Posted March 13, 2014 You can't just start and stop a resource for one player only. If you start a resource, it will be loaded for every single player on your server same thing applies for stopping and restarting it, keep that in mind.
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