ArcAngeL Posted April 2, 2019 Share Posted April 2, 2019 ı want add specific panel for Hells Angels group.but still everyone can open with /grouppanel command.what s my wrong friends ? client : function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end addCommandHandler('grouppanel', OpenWin) addEvent( "onGreet", true ) addEventHandler( "onGreet", localPlayer, OpenWin ) server : function panel(source) if getElementData(source, "Group") == "HellsAngels" then triggerClientEvent ( source, "onGreet", source ) end end addEventHandler ( "onResourceStart", root, panel ) Link to comment
Moderators Patrick Posted April 2, 2019 Moderators Share Posted April 2, 2019 -- CLIENT SIDE function OpenWin() if getElementData(localPlayer, "Group") == "HellsAngels" then -- elementdata is a shared variable, so you can get it on client side if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end end addCommandHandler('grouppanel', OpenWin) -- SERVER SIDE NOT NEED 1 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