'LinKin Posted December 17, 2013 Share Posted December 17, 2013 Hello, I've looked unluckly for a script that allows you to hide absolutely everything from your screen (HUD, Radar, Timelimit, Chatbox, etc..) The gamemode is race, so far I know how to hide chatbox, and radar. But what about the rest Can anyone help? Link to comment
xXMADEXx Posted December 17, 2013 Share Posted December 17, 2013 These: showChat showPlayerHudComponent Link to comment
Driggero Posted December 17, 2013 Share Posted December 17, 2013 These: showChat showPlayerHudComponent These will hide the chat and the radar but you'll need to edit race if you want to hide everything (the timelimit, rank, healthbar etc). Inside the race_client.lua you should add inside a new function: hideGUIComponents('timeleftbg', 'timeleft', 'healthbar', 'health', 'rank', 'ranknum', 'ranksuffix', 'checkpoint', 'timepassed') I think that's all of them but if you've customised race at all then you will need to add/remove things. Then you can either export that function and use it from another resource or just put the controls directly in the race_client. Good luck Link to comment
myonlake Posted December 17, 2013 Share Posted December 17, 2013 In case there is someone else that wants this done more quicker than doing showPlayerHudComponent each time for every individual component, just use the code below. showPlayerHudComponents ( player playerSource, bool status, string component, ... ) local components = {["ammo"]=true, ["area_name"]=true, ["armour"]=true, ["breath"]=true, ["clock"]=true, ["health"]=true, ["money"]=true, ["radar"]=true, ["vehicle_name"]=true, ["weapon"]=true, ["radio"]=true, ["wanted"]=true, ["crosshair"]=true, ["all"]=true} function showPlayerHudComponents(playerSource, status, ...) local args = {...} if (not playerSource) or (type(status) ~= "boolean") or (not ...) or (not args) then outputDebugString("Improper amount of arguments passed in (min. 3)", 1) return false end if (not isElement(playerSource)) then outputDebugString("Invalid player element passed in, got \"" .. type(playerSource) .. "\".", 1) return false end if (type(status) ~= "boolean") then outputDebugString("Argument 2 is not a boolean value, instead \"" .. tostring(status) .. "\".", 1) return false end for index,value in ipairs(args) do local value = tostring(value) if (not components[value]) then outputDebugString("Incorrect HUD component value entered \"" .. value .. "\" on argument " .. index .. ".", 1) return false end showPlayerHudComponent(playerSource, value, status) end return true end In action it would work like this: showPlayerHudComponents(getPlayerFromName("playername"), false, "radar", "money", "breath", "health", "clock") 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