Jump to content

[Question]


Recommended Posts

Posted
hi guys i problem i have work for admin panel and i tested it it work but when any player joins my server when i try to open it dose not show idk why ?

Do you mean that YOU can't open the adminpanel when a player joins, or that THAT player can't open the adminpanel?

Posted

i have work for admin Panel only team staff can open it with click O but when i only in my server when i press O it work but when any player join my server and i try to open it dose not show idk why ?!

Posted
Is it the Admin Panel that come with the MTA server? or is it a admin panel that you made for your server?

my admin panel for my server when i click O it open but when any player join server when i click O don't work

Posted
maybe your attaching the binding to the player that's joining

this is my bind

function onresourceStart () 
  bindKey ("o", "down", showTnsAdminpanel) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) 

Posted

try this then:

Client-side:

addEvent("onClientLogin",true) 
addEventHandler("onClientLogin",root,function() 
  bindKey ("o", "down", showTnsAdminpanel) 
end) 

Server-side:

addEventHandler("onPlayerLogin",root,function() 
   if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Admin"))then 
      triggerClientEvent(source,"onClientLogin",root) 
   end 
end) 
  

  • 3 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...