Andreas. Posted July 30, 2012 Share Posted July 30, 2012 Hello, i'm new to the whole exporting thing and i tried but i seem to encounter a problem i cant solve.. server function showPlayerGUI(status, player) triggerClientEvent(player, "showGUI", player, status) end client addEvent("showGUI", true) function showGUI(status) if status == "true" then guiSetVisible(guiWindow, true) showCursor(true) elseif status == "false" then guiSetVisible(guiWindow, false) showCursor(false) end end addEventHandler("showGUI", root, showGUI) meta.xml <export function="showPlayerGUI" type="server"/> <export function="showGUI" type="client"/> and where I trigger the export exports.(RES)showGUI:showPlayerGUI(source, "true") debug message; <name> expected near '(' EDIT: Okay, I got it to work client-sided still need help with ^ Link to comment
Anderl Posted July 30, 2012 Share Posted July 30, 2012 exports.['resource_name']:showPlayerGUI( source, 'true' ) -- or exports.resource_name:showPlayerGUI( source, 'true' ) Link to comment
Andreas. Posted July 30, 2012 Author Share Posted July 30, 2012 exports.['resource_name']:showPlayerGUI( source, 'true' ) -- or exports.resource_name:showPlayerGUI( source, 'true' ) Yea, tried that no result nothing in debug either scratch ^, I made it work. /close 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