Jump to content

Clear screen


'LinKin

Recommended Posts

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

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

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...