Adde Posted June 13, 2013 Share Posted June 13, 2013 Hey guys, I have a problem. This is the function that I have to join Staff team in my team gui. But the problem is that everytime someone that don´t have premission to join staff press "Staff" button, the gui shows for everybody on the server. And when that button is pressed debug says (server triggered client side, event "onTeamAdmin", but event is not added client side). I just don´t get it how I should change so it works as it should (so gui not get visible for everyone when nonStaff press staff button). btw: it didn´t work with isObjectInACLGroup and then havePlayerPremissionTo... server function joinAdmin() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("HeadAdmin")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("TrialStaff")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("TrialScripter")) then setPlayerTeam(source,teamAdmin) spawnPlayer ( source, 2216.51,-3195.87,6.5, 90 ) setElementModel(source,217) setPlayerNametagColor ( source, 255, 128, 0 ) setElementHealth(source,100) giveWeapon(source,24,600) giveWeapon(source,27,400) giveWeapon(source,30,700) giveWeapon(source,31,1500) giveWeapon(source,34,200) giveWeapon(source,38,2000) giveWeapon(source,16,40) setCameraTarget(source,player) else outputChatBox ( "[sALA]:You are not part of Staff!", source, 255,0,0 ) triggerClientEvent("onTeamAdmin", getRootElement(),source) end end addEvent("setTeamAdmin", true) addEventHandler("setTeamAdmin",getRootElement(),joinAdmin) client function flupp () guiSetVisible(GUIEditor.window[2],true) showCursor(true) end addEvent("onTeamAdmin", true) addEventHandler("onTeamAdmin", getLocalPlayer(), flupp) Link to comment
iPrestege Posted June 13, 2013 Share Posted June 13, 2013 Because the trigger 'root' Returning for all players . Link to comment
Castillo Posted June 13, 2013 Share Posted June 13, 2013 triggerClientEvent("onTeamAdmin", getRootElement(),source) Change that line to: triggerClientEvent ( source, "onTeamAdmin", source ) Link to comment
Adde Posted June 13, 2013 Author Share Posted June 13, 2013 Okay thx, I will change that and wait for players to tell me if it works as it should Btw, When someone die the cursor wont show. But it should. Nothing in debug. client function spawn() if not guiGetVisible(GUIEditor.window[2]) then guiSetVisible(GUIEditor.window[2], true) showCursor(true) end end end addEventHandler("onClientPlayerWasted",getLocalPlayer(), spawn) or wait, is player/source forgot on showCursor? 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