mohssan123 Posted March 31, 2013 Share Posted March 31, 2013 ابغي زر ما يفتح الا للادمن حاولة اسويه لكن اذا ابغي اخليه بس للدمن لازم اخليه سيرفر و انا الامر ال عندي لازم يكون كلنت Link to comment
iPrestege Posted March 31, 2013 Share Posted March 31, 2013 isObjectInACLGroup triggerClientEvent addEvent addEventHandler triggerServerEvent Link to comment
yazan Posted March 31, 2013 Share Posted March 31, 2013 كلنت addEvent ( "onOpenDataWindow", true ) addEventHandler ( "onOpenDataWindow", root, function ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetInputEnabled ( guiGetVisible( GUIEditor_Window[1] ) ) end ) سيرفر aOpen_ = function ( plr_ ) local plrAccount = getPlayerAccount ( plr_ ) if not isGuestAccount ( plrAccount ) then if isObjectInACLGroup ("user."..getAccountName ( plrAccount ), aclGetGroup ( "Admin" ) ) then triggerClientEvent ( plr_, "onOpenDataWindow", plr_ ) end end end مو كودي Link to comment
mohssan123 Posted March 31, 2013 Author Share Posted March 31, 2013 isObjectInACLGroup triggerClientEvent addEvent addEventHandler triggerServerEvent سويت الكود بس ما يشتغل ويش الخطأ كلنت addEventHandler( "onClientGUIClick", badmin, function ( ) triggerServerEvent ( "admin1", localPlayer ) end ) addEvent("admin2",true) addEventHandler("admin2",root, function() guiSetVisible(admin,true) end ) سيرفر addEvent("admin1",true) addEventHandler("admin1",root, function() if isObjectInACLGroup ( "user." ..getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Moderator" ) ) then triggerClientEvent ( "admin2", localPlayer ) end end ) Link to comment
mohssan123 Posted March 31, 2013 Author Share Posted March 31, 2013 كلنت addEvent ( "onOpenDataWindow", true ) addEventHandler ( "onOpenDataWindow", root, function ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetInputEnabled ( guiGetVisible( GUIEditor_Window[1] ) ) end ) سيرفر aOpen_ = function ( plr_ ) local plrAccount = getPlayerAccount ( plr_ ) if not isGuestAccount ( plrAccount ) then if isObjectInACLGroup ("user."..getAccountName ( plrAccount ), aclGetGroup ( "Admin" ) ) then triggerClientEvent ( plr_, "onOpenDataWindow", plr_ ) end end end مو كودي ما فهمت للكود الي انت حاطنه .. كانه مخربط Link to comment
iPrestege Posted March 31, 2013 Share Posted March 31, 2013 -- Client -- addEventHandler("onClientGUIClick",badmin, function ( ) triggerServerEvent("admin1",localPlayer); end,false); addEvent("admin2",true); addEventHandler("admin2",root, function ( ) guiSetVisible(admin,true); end ); -- Server -- addEvent("admin1",true); addEventHandler("admin1",root, function ( ) if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) then triggerClientEvent("admin2",source); else outputChatBox("* لا يمكنك استخدام الزر للادمنيةة فقطط",source,255,0,0,true); end end ); Link to comment
3NAD Posted March 31, 2013 Share Posted March 31, 2013 سيرفر addEvent("admin1",true) addEventHandler("admin1",root, function() if isObjectInACLGroup ( "user." ..getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Moderator" ) ) then triggerClientEvent ( "admin2", localPlayer ) end end ) thePlayer = ? localPlayer = ? لزوم تسوي لهم تعاريف وقبل كل ذا لازم تحقق ان الاعب له حساب و مو زاير isGuestAccount Link to comment
mohssan123 Posted March 31, 2013 Author Share Posted March 31, 2013 -- Client -- addEventHandler("onClientGUIClick",badmin, function ( ) triggerServerEvent("admin1",localPlayer); end,false); addEvent("admin2",true); addEventHandler("admin2",root, function ( ) guiSetVisible(admin,true); end ); -- Server -- addEvent("admin1",true); addEventHandler("admin1",root, function ( ) if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) then triggerClientEvent("admin2",source); else outputChatBox("* لا يمكنك استخدام الزر للادمنيةة فقطط",source,255,0,0,true); end end ); مشكورر تستاهل وسام على ردودك في المواضيع لكن سؤال ويش فايدة ; لان اشوف اكثر كوداتك الي تحطها هنا فيه كذا Link to comment
iPrestege Posted March 31, 2013 Share Posted March 31, 2013 حياك الله ذذ مثل ما قال عناد نسيت اسوي تحقق اذا كان حساب زائر : addEvent("admin1",true); addEventHandler("admin1",root, function ( ) if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("* انت زائر",source,255,0,0,true); end if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) then triggerClientEvent("ClientSide",source); else outputChatBox("* لا يمكنك استخدام الزر للادمنيةة فقطط",source,255,0,0,true); end; 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