Electro88 Posted July 29, 2016 Posted July 29, 2016 Bind key why not working Server: function gui (player ) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent (player,"pop",player) end end bindKey("F2","down", gui) function bindTab(localPlayer ) bindKey(localPlayer, "F2","down", gui) end Client: function popa ( player ) guiSetVisible(Wnd,true) showCursor(true) end addEvent("pop",true) addEventHandler("pop", getRootElement(), popa )
Electro88 Posted July 29, 2016 Author Posted July 29, 2016 Not change anything and why random player please anyone help me ?
Walid Posted July 29, 2016 Posted July 29, 2016 Try this untested i'm using the phone. -- Server side function gui (player) local account = getPlayerAccount(player) if account and not isGuestAccount(account) then local accName = getAccountName (account) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent (player,"pop",player) end end end function bindTab( thePlayer ) bindKey( thePlayer, "F2","down", gui) end function bindTabOnPlayerJoin () bindTab(source) end addEventHandler("onPlayerJoin",root, bindTabOnPlayerJoin) function bindTabOnResourceStart () local players = getElementsByType("player") for index, player in pairs(players) do bindTab(player) end end addEventHandler("onResourceStart",resourceRoot, bindTabOnResourceStart ) -- Client side -- Client side function popa () guiSetVisible(Wnd,true) showCursor(true) end addEvent("pop",true) addEventHandler("pop", root), popa ) Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Walid Posted July 30, 2016 Posted July 30, 2016 Thanks Worked! <3 You are welcome Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
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