Jump to content

How To Disable The Map Function In F1


Recommended Posts

Posted
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
guiSetEnabled ( guiElement, true ) 
elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Everyone" ) ) then 
guiSetEnabled ( guiElement, false ) 
cancelEvent(true) 
end 
end 
  

this is what you need,

for the guiElement you enter in what the element your GUI uses

nJgL8wr.png

I DON'T HAVE HATERS, I JUST HAVE FANS IN DENIAL

Posted
aaaah, true but you can use "isObjectInACLGroup" in client sided scripts

No, You can't

Bind the key serverside, and trigger it to client.

server:

  
function bound (theplayer) 
account=getPlayerAccount(theplayer) 
if isObjectInACLGroup("user."..account,"Admin") then 
triggerClientEvent("onMapAllowed",theplayer) 
else 
triggerClientEvent("onMapUnallowed",theplayer) 
end 
end 
addEventHandler("onPlayerJoin",root,function () 
for i,v in ipairs(getElementsByType("player")) do 
bindKey(v,"F1","down",bound) 
end 
end 
) 
  

client:

  
addEvent("onMapAllowed",true) 
addEvent("onMapUnallowed",true) 
  
function allowed () 
guiSetEnabled(button,true) 
end 
  
function unallowed () 
guiSetEnabled(button,false) 
end 
addEventHandler("onMapAllowed",root,allowed) 
addEventHandler("onMapUnallowed",root,unallowed) 
  

Ingame Name: Arnold

If you need my help, contact me on Skype @bshr.ara

NOTE:DO NOT ASK ME FOR SCRIPTS, ASK ME FOR HELP

Posted

You'll have to edit the fr_client.lua if you're talking about Freeroam. All the buttons are stored in a table too. So you may wanna check on that. I'll see if I can do it later and PM it you :)

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...