tourra Posted March 28, 2013 Share Posted March 28, 2013 يا شباب بغيت كود يعني يخلي الى الادمن يفتح اللوحه و شكرا Link to comment
PaiN^ Posted March 28, 2013 Share Posted March 28, 2013 -- server -- addEventHandler ( 'onResourceStart', resourceRoot, function ( ) local players = getElementsByType ( 'player' ) for i,v in ipairs (players) do local acc = getAccountName ( getPlayerAccount ( v ) ) if isObjectInACLGroup ( 'user.'..acc, aclGetGroup ( 'Admin' ) ) then setElementData ( v, 'allowed', true ) end end end ) -- client -- Key = 'زر فتح النافذة' bindKey ( Key, 'down', function ( ) if getElementData ( localPlayer, 'allowed' ) == true then local visible = guiGetVisible ( النافذة ) guiSetVisible ( النافذة, not visible ) showCursor ( visible ) end end ) Link to comment
TAPL Posted March 28, 2013 Share Posted March 28, 2013 -- server -- addEventHandler ( 'onResourceStart', resourceRoot, function ( ) local players = getElementsByType ( 'player' ) for i,v in ipairs (players) do local acc = getAccountName ( getPlayerAccount ( v ) ) if isObjectInACLGroup ( 'user.'..acc, aclGetGroup ( 'Admin' ) ) then setElementData ( v, 'allowed', true ) end end end ) -- client -- Key = 'زر فتح النافذة' bindKey ( Key, 'down', function ( ) if getElementData ( localPlayer, 'allowed' ) == true then local visible = guiGetVisible ( النافذة ) guiSetVisible ( النافذة, not visible ) showCursor ( visible ) end end ) showCursor ( not visible ) Link to comment
iPrestege Posted March 28, 2013 Share Posted March 28, 2013 -- server -- addEventHandler ( 'onResourceStart', resourceRoot, function ( ) local players = getElementsByType ( 'player' ) for i,v in ipairs (players) do local acc = getAccountName ( getPlayerAccount ( v ) ) if isObjectInACLGroup ( 'user.'..acc, aclGetGroup ( 'Admin' ) ) then setElementData ( v, 'allowed', true ) end end end ) -- client -- Key = 'زر فتح النافذة' bindKey ( Key, 'down', function ( ) if getElementData ( localPlayer, 'allowed' ) == true then local visible = guiGetVisible ( النافذة ) guiSetVisible ( النافذة, not visible ) showCursor ( visible ) end end ) الكود مآهو غريب علي ومعدل فية بس لازم تسوي تأكيد يوم يسجل دخولة ( = Link to comment
PaiN^ Posted March 28, 2013 Share Posted March 28, 2013 الكود مآهو غريب علي ومعدل فية ! حرام عليك والله اني مسويه بنفسي + بس لازم تسوي تأكيد يوم يسجل دخولة ( = كلامك صح -- server -- addEventHandler ( 'onPlayerLogin', root, function ( _,acc ) local accName = getAccountName ( acc ) if isObjectInACLGroup ( 'user.'..accName, aclGetGroup ( 'Admin' ) ) then setElementData ( source, 'allowed', true ) end end ) addEventHandler ( 'onPlayerLogout', root, function ( ) setElementData ( source, 'allowed', false ) end ) Link to comment
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