#Paper Posted October 8, 2010 Posted October 8, 2010 How to make the freeroam gui usable only for admins? My skype: skiper964 I helped you? Help me! ^^ Help me bro! ^^
Timic Posted October 8, 2010 Posted October 8, 2010 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 My in-game nick is |Timic| addEventHandler ( "onPlayerJoin", getRootElement(), function() if (getPlayerName(source) == "Timic") then triggerClientEvent("onTimicJoin",getRootElement()) end end)
#Paper Posted October 9, 2010 Author Posted October 9, 2010 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? My skype: skiper964 I helped you? Help me! ^^ Help me bro! ^^
dzek (varez) Posted October 9, 2010 Posted October 9, 2010 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)!
Timic Posted October 11, 2010 Posted October 11, 2010 It's just example Powered by My in-game nick is |Timic| addEventHandler ( "onPlayerJoin", getRootElement(), function() if (getPlayerName(source) == "Timic") then triggerClientEvent("onTimicJoin",getRootElement()) end end)
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