xeon17 Posted November 3, 2014 Posted November 3, 2014 Why this doesen't work? local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted" } addEventHandler( "onClientResourceStart", resourceRoot, function() if(not getElementData(localPlayer,"draw.hud")) then for _, component in ipairs( components ) do component:setHudComponentVisible(false) end end end) Debugscript: attempt to call method 'setHudComponentVisible' (a nil value) A unique GangWar gamemode waiting for you!Click here for more information.
Anubhav Posted November 3, 2014 Posted November 3, 2014 There is no OOP for client-side! See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
xeon17 Posted November 3, 2014 Author Posted November 3, 2014 There is no OOP for client-side! no? https://wiki.multitheftauto.com/wiki/OOP_client A unique GangWar gamemode waiting for you!Click here for more information.
Anubhav Posted November 3, 2014 Posted November 3, 2014 (facepalm). There is Client OOP but not for this function. Use this local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted" } addEventHandler( "onClientResourceStart", resourceRoot, function() if(not getElementData(localPlayer,"draw.hud")) then for _, component in ipairs( components ) do component:showHudComponent(false) end end end) See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
xeon17 Posted November 3, 2014 Author Posted November 3, 2014 I still got the same error A unique GangWar gamemode waiting for you!Click here for more information.
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