kewiiNNN Posted October 9, 2015 Share Posted October 9, 2015 how to fix this : http://i.imgur.com/Xo6oMzN.jpg The old hud reapears when i die or something. when i reaload the hud and minimap then it disapears... PLEASE HELP Link to comment
Fist Posted October 9, 2015 Share Posted October 9, 2015 Probably in your gamemode is function that sets default hud back when u die or "something". Try to find that line and delete it or try use this script below. its client side script. local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted" } function removeHud() for _, component in ipairs( components ) do setPlayerHudComponentVisible(component ,false) end end addEventHandler("onClientPlayerSpawn", root, removeHud) Link to comment
kewiiNNN Posted October 9, 2015 Author Share Posted October 9, 2015 Here is the code local spawnpoint addEventHandler("onResourceStart", resourceRoot, function() spawnpoint = getRandomSpawnPoint() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) if not isElement(player) then return end if get("spawnreset") == "onSpawn" then spawnpoint = getRandomSpawnPoint() end exports.spawnmanager:spawnPlayerAtSpawnpoint(player,spawnpoint,false) repeat until setElementModel(player,math.random(312)) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end function getRandomSpawnPoint () local spawnpoints = getElementsByType("spawnpoint") return spawnpoints[math.random(1,#spawnpoints)] end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerQuit",root, function () if getPlayerCount() == 1 and get("spawnreset") == "onServerEmpty" then spawnpoint = getRandomSpawnPoint() end end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end ) Link to comment
Fist Posted October 9, 2015 Share Posted October 9, 2015 script is fine, try to use script what i gave u, or tell me what resource you use for hud replacer. (that new hud what u use) Link to comment
kewiiNNN Posted October 9, 2015 Author Share Posted October 9, 2015 The weapon Icons disapears what about minimap? it stays there? https://community.multitheftauto.com/ind ... s&id=12178 Link to comment
Fist Posted October 9, 2015 Share Posted October 9, 2015 The weapon Icons disapears what about minimap? it stays there?https://community.multitheftauto.com/ind ... s&id=12178 local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted","radar" } function removeHud() for _, component in ipairs( components ) do setPlayerHudComponentVisible(component ,false) end end addEventHandler("onClientPlayerSpawn", root, removeHud) Link to comment
kewiiNNN Posted October 9, 2015 Author Share Posted October 9, 2015 works! thank you very much. Link to comment
Fist Posted October 9, 2015 Share Posted October 9, 2015 works! thank you very much. np. 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