Jump to content

مشكلة بالكود


Qus4Y

Recommended Posts

مرحبا شباب

انا سويت كود يخفي الرادار والدم والدرع وكذا

الكود اشتغل بس فيه مشكلة لما اعمل ريكنكت يرجع كلشي وكانه ما فيه سكربت ايش الحل 

local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted" ,"radar"}

addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
function ()
    for _, component in ipairs( components ) do
        setPlayerHudComponentVisible( component, false )
    end
end)


addEventHandler ( "onPlayerJoin", root, 
    function hideall()
    setPlayerHudComponentVisible("radar", false)
    setPlayerHudComponentVisible ( "ammo", false )
    setPlayerHudComponentVisible ( "area_name", false )
    setPlayerHudComponentVisible ( "amour", false )    
    setPlayerHudComponentVisible ( "breath", false )
    setPlayerHudComponentVisible ( "clock", false )
    setPlayerHudComponentVisible ( "health", false )
    setPlayerHudComponentVisible ( "money", false )    
    setPlayerHudComponentVisible ( "radar", false )
    setPlayerHudComponentVisible ( "vehicle_name", false )
    setPlayerHudComponentVisible ( "radio", false )
    setPlayerHudComponentVisible ( "weapon", false ))
    end
)

 

Link to comment
addEventHandler("onResourceStart", resourceRoot,
	function ()
		for _,v in ipairs (getElementsByType("player")) do
			setPlayerHudComponentVisible( v, "all", false )
		end
	end
)

addEventHandler ( "onPlayerJoin", root, 
    function ()
		setPlayerHudComponentVisible(source, "all", false)
    end
)

 

  • Like 1
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...