Jump to content

Freeroam gui


#Paper

Recommended Posts

Posted

Just do like this: (its from admin system)

_aclrights = {} 
  
function hasPermissionTo ( object ) 
    if ( _aclrights[object] ) then 
        return true 
    end 
    return false 
end 
  
addEvent ( "aPermissions", true ) 
addEventHandler ( "aPermissions", getLocalPlayer(), function ( table ) 
    for id, right in ipairs ( table ) do 
        _aclrights[right] = true 
        if ( aAdminForm ) then 
            guiSetEnabled ( _guiprotected[right], true ) 
        end 
    end 
end ) 
  
addEventHandler ( "onAdminInitialize", _root, function() 
    if ( #_guiprotected == 0 ) then 
        triggerServerEvent ( "aPermissions", getLocalPlayer() ) 
    end 
end ) 
  

If im right run on client-side! ;)

Powered by

image.png

My in-game nick is |Timic|

addEventHandler ( "onPlayerJoin", getRootElement(),

function()

if (getPlayerName(source) == "Timic") then

triggerClientEvent("onTimicJoin",getRootElement())

end

end)

Posted
Just do like this: (its from admin system)
_aclrights = {} 
  
function hasPermissionTo ( object ) 
    if ( _aclrights[object] ) then 
        return true 
    end 
    return false 
end 
  
addEvent ( "aPermissions", true ) 
addEventHandler ( "aPermissions", getLocalPlayer(), function ( table ) 
    for id, right in ipairs ( table ) do 
        _aclrights[right] = true 
        if ( aAdminForm ) then 
            guiSetEnabled ( _guiprotected[right], true ) 
        end 
    end 
end ) 
  
addEventHandler ( "onAdminInitialize", _root, function() 
    if ( #_guiprotected == 0 ) then 
        triggerServerEvent ( "aPermissions", getLocalPlayer() ) 
    end 
end ) 
  

If im right run on client-side! ;)

in what script i should add thi part?

If i add this code the freeroam gui be usable only for admins?

mtaubluascripter.png

My skype: skiper964

I helped you? Help me! ^^

Help me bro! ^^

Posted

this is general advice i think (and not complete) - you still need to understand lua to make this like you want

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

It's just example ;)

Powered by

image.png

My in-game nick is |Timic|

addEventHandler ( "onPlayerJoin", getRootElement(),

function()

if (getPlayerName(source) == "Timic") then

triggerClientEvent("onTimicJoin",getRootElement())

end

end)

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