#Untied Posted April 24, 2016 Share Posted April 24, 2016 سلام عليكم مش هطول كتير انا عامل في لوحتي button عاوز ال button يفتح للكونسل فقط اي حد يجرب يفتحو يكون مخفي Link to comment
MR.GRAND Posted April 24, 2016 Share Posted April 24, 2016 سلام عليكم مش هطول كتيرانا عامل في لوحتي button عاوز ال button يفتح للكونسل فقط اي حد يجرب يفتحو يكون مخفي --Server Side addEventHandler - 'onResourceStart' if -- for check if the player in selected Group isObjectInACLGroup triggerClientEvent -- Client Side guiSetEnabled -- for Enable button Link to comment
[iMr]-W[i]Fi,.! Posted April 25, 2016 Share Posted April 25, 2016 (edited) -- Server addEvent('IHateMezo',true) addEventHandler('IHateMezo',root, function ( ) local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent(source,"AccE",source) end end ) -- Client guiSetEnabled(btn,false) addEventHandler("onClientGUIClick",root, function () if source == btn then triggerServerEvent("IHateMezo",localPlayer) end ) addEvent("AccE",true) addEventHandler("AccE",root, function () guiSetEnabled(btn,true) end ) Edited April 25, 2016 by Guest Link to comment
Me[Z]oO Posted April 25, 2016 Share Posted April 25, 2016 ممكن الكود جاهز :@@ --Client addEventHandler("onClientGUIClick",root, function() if source == button then triggerServerEvent("Mta",localPlayer) end end) addEvent("Mezo",true) addEventHandler("Mezo",root, function() -- Your code end) --Server addEvent("Mta",true) addEventHandler("Mta",root, function() local accName = getAccountName ( getPlayerAccount ( source) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent(source,"Mezo",source) else outputChatBox("u must be in group console",source,255,0,0) end end) ي ليت تتعلم ولا تنسخ وتلصق Link to comment
Me[Z]oO Posted April 25, 2016 Share Posted April 25, 2016 -- Server addEventHandler('onPlayerLogin',root, function ( player ) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent(player,"AccE",player) end end ) -- Client guiSetEnabled(btn,false) addEvent("AccE",true) addEventHandler("AccE",root, function () guiSetEnabled(btn,true) end ) player م هي معرفة !! Link to comment
[iMr]-W[i]Fi,.! Posted April 25, 2016 Share Posted April 25, 2016 (edited) IHateMezo ShowUp Edited April 25, 2016 by Guest Link to comment
Me[Z]oO Posted April 25, 2016 Share Posted April 25, 2016 -- Server addEventHandler('onPlayerLogin',root, function ( player ) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent(player,"AccE",player) end end ) -- Client guiSetEnabled(btn,false) addEvent("AccE",true) addEventHandler("AccE",root, function () guiSetEnabled(btn,true) end ) player م هي معرفة !! function ( player ) حد قال لك ان حدث دخول اللاعب لازم نعرف اللاعب ؟ حبيبي اللاعب هو السورس source ! Link to comment
Me[Z]oO Posted April 25, 2016 Share Posted April 25, 2016 خلاص عدلته ارتحت ؟ اول شي حبيت اوضحها لك فقط مو قصدي شي ! Link to comment
Jupi Posted April 25, 2016 Share Posted April 25, 2016 ممكن الكود جاهز :@@ --Client addEventHandler("onClientGUIClick",root, function() if source == button then triggerServerEvent("Mta",localPlayer) end end) addEvent("Mezo",true) addEventHandler("Mezo",root, function() -- Your code end) --Server addEvent("Mta",true) addEventHandler("Mta",root, function() local accName = getAccountName ( getPlayerAccount ( source) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent(source,"Mezo",source) else outputChatBox("u must be in group console",source,255,0,0) end end) ي ليت تتعلم ولا تنسخ وتلصق اعطاه جاهز و يقوله تعلم منه Link to comment
#Untied Posted April 25, 2016 Author Share Posted April 25, 2016 ما ظبت برده GUIEditor = { edit = {}, button = {}, window = {}, label = {}, gridlist = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(143, 151, 243, 401, "Nick ", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(141, 44, 92, 45, "", false, GUIEditor.window[1]) GUIEditor.gridlist[1] = guiCreateGridList(9, 23, 132, 368, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Players", 0.9) GUIEditor.button[1] = guiCreateButton(145, 95, 88, 48, "Set", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0DF1E3") GUIEditor.button[2] = guiCreateButton(145, 156, 88, 48, "Resotre Name", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFE0B0B") GUIEditor.button[3] = guiCreateButton(377, 314, 0, 15, "", false, GUIEditor.window[1]) end ) function Strong ( ) guiSetVisible ( GUIEditor.window[1],true ) showCursor ( true ) -- اظهار الماوس end addCommandHandler ( "NICK",Strong ) addEventHandler("onClientGUIClick",root, function() if source == GUIEditor.button[2] then triggerServerEvent("Mta",localPlayer) end end) addEvent("Mezo",true) addEventHandler("Mezo",root, function() end) addEvent("Mta",true) addEventHandler("Mta",root, function() local accName = getAccountName ( getPlayerAccount ( source) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent(source,"Mezo",source) else outputChatBox("u must be in group console",source,255,0,0) end end) Link to comment
[iMr]-W[i]Fi,.! Posted April 25, 2016 Share Posted April 25, 2016 GUIEditor = { edit = {}, button = {}, window = {}, label = {}, gridlist = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(143, 151, 243, 401, "Nick ", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(141, 44, 92, 45, "", false, GUIEditor.window[1]) GUIEditor.gridlist[1] = guiCreateGridList(9, 23, 132, 368, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Players", 0.9) GUIEditor.button[1] = guiCreateButton(145, 95, 88, 48, "Set", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0DF1E3") GUIEditor.button[2] = guiCreateButton(145, 156, 88, 48, "Resotre Name", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFE0B0B") GUIEditor.button[3] = guiCreateButton(377, 314, 0, 15, "", false, GUIEditor.window[1]) end ) function Strong ( ) guiSetVisible ( GUIEditor.window[1],true ) showCursor ( true ) -- اظهار الماوس end addCommandHandler ( "NICK",Strong ) -- Client guiSetEnabled(btn,false) addEventHandler("onClientGUIClick",root, function () if source == btn then triggerServerEvent("IHateMezo",localPlayer) end ) addEvent("AccE",true) addEventHandler("AccE",root, function () guiSetEnabled(btn,true) end ) -- Server addEvent('IHateMezo',true) addEventHandler('IHateMezo',root, function ( ) local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent(source,"AccE",source) end end ) Link to comment
[iMr]-W[i]Fi,.! Posted April 25, 2016 Share Posted April 25, 2016 GUIEditor = { edit = {}, button = {}, window = {}, label = {}, gridlist = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(143, 151, 243, 401, "Nick ", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(141, 44, 92, 45, "", false, GUIEditor.window[1]) GUIEditor.gridlist[1] = guiCreateGridList(9, 23, 132, 368, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Players", 0.9) GUIEditor.button[1] = guiCreateButton(145, 95, 88, 48, "Set", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0DF1E3") GUIEditor.button[2] = guiCreateButton(145, 156, 88, 48, "Resotre Name", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFE0B0B") GUIEditor.button[3] = guiCreateButton(377, 314, 0, 15, "", false, GUIEditor.window[1]) end ) function Strong ( ) guiSetVisible ( GUIEditor.window[1],true ) showCursor ( true ) -- اظهار الماوس end addCommandHandler ( "NICK",Strong ) -- Client guiSetEnabled(btn,false) addEventHandler("onClientGUIClick",root, function () if source == btn then triggerServerEvent("IHateMezo",localPlayer) end ) addEvent("AccE",true) addEventHandler("AccE",root, function () guiSetEnabled(btn,true) end ) -- Server addEvent('IHateMezo',true) addEventHandler('IHateMezo',root, function ( ) local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent(source,"AccE",source) end end ) جرب ذذ GUIEditor = { edit = {}, button = {}, window = {}, label = {}, gridlist = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(143, 151, 243, 401, "Nick ", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(141, 44, 92, 45, "", false, GUIEditor.window[1]) GUIEditor.gridlist[1] = guiCreateGridList(9, 23, 132, 368, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Players", 0.9) GUIEditor.button[1] = guiCreateButton(145, 95, 88, 48, "Set", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0DF1E3") GUIEditor.button[2] = guiCreateButton(145, 156, 88, 48, "Resotre Name", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFE0B0B") GUIEditor.button[3] = guiCreateButton(377, 314, 0, 15, "", false, GUIEditor.window[1]) end ) function Strong ( ) guiSetVisible ( GUIEditor.window[1],true ) showCursor ( true ) -- اظهار الماوس end addCommandHandler ( "NICK",Strong ) -- Client guiSetEnabled(GUIEditor.button[1],false) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[1] then triggerServerEvent("IHateMezo",localPlayer) end ) addEvent("AccE",true) addEventHandler("AccE",root, function () guiSetEnabled(GUIEditor.button[1],true) end ) -- Server addEvent('IHateMezo',true) addEventHandler('IHateMezo',root, function ( ) local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent(source,"AccE",source) end end ) Link to comment
YourMind Posted April 25, 2016 Share Posted April 25, 2016 -- client GUIEditor = { gridlist = {}, window = {}, button = {}, edit = {}} local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow(143, 151, 268, 401, "Nick ", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible (GUIEditor.window[1],false) GUIEditor.edit[1] = guiCreateEdit(147, 53, 111, 32, "", false, GUIEditor.window[1]) GUIEditor.gridlist[1] = guiCreateGridList(9, 23, 132, 368, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Players", 0.9) GUIEditor.button[1] = guiCreateButton(157, 95, 88, 48, "Set", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0DF1E3") GUIEditor.button[2] = guiCreateButton(157, 153, 88, 48, "Resotre Name", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFE0B0B") GUIEditor.button[3] = guiCreateButton(377, 314, 0, 15, "", false, GUIEditor.window[1]) function Strong ( ) guiSetVisible ( GUIEditor.window[1],not guiGetVisible (GUIEditor.window[1])) showCursor (guiGetVisible (GUIEditor.window[1])) guiSetInputEnabled (guiGetVisible (GUIEditor.window[1])) guiSetEnabled (GUIEditor.button[1],false) triggerServerEvent ("check",localPlayer) end addCommandHandler ("NICK",Strong) addEvent ("checkD",true) addEventHandler ("checkD",root, function () guiSetEnabled (GUIEditor.button[1],true) end) -- server addEvent('check',true) addEventHandler('check',root, function ( ) local accName = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ("user."..accName,aclGetGroup ( "Console" )) then triggerClientEvent(source,"checkD",source) end end ) Link to comment
#Untied Posted April 25, 2016 Author Share Posted April 25, 2016 تمام اشتغل كد ا فيه مشكله؟ addEvent('check',true) addEventHandler('check',root, function ( ) local accName = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ("user."..accName,aclGetGroup ( "Console" )) then if isObjectInACLGroup ("user."..accName,aclGetGroup ( "Level 5" )) then if isObjectInACLGroup ("user."..accName,aclGetGroup ( "Level 6" )) then if isObjectInACLGroup ("user."..accName,aclGetGroup ( "Head.Admin )) then triggerClientEvent(source,"checkD",source) end end ) Link to comment
Ja[B]er[X]Pro Posted April 25, 2016 Share Posted April 25, 2016 تمام اشتغل كد ا فيه مشكله؟ addEvent('check',true) addEventHandler('check',root, function ( ) local accName = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ("user."..accName,aclGetGroup ( "Console" )) then if isObjectInACLGroup ("user."..accName,aclGetGroup ( "Level 5" )) then if isObjectInACLGroup ("user."..accName,aclGetGroup ( "Level 6" )) then if isObjectInACLGroup ("user."..accName,aclGetGroup ( "Head.Admin )) then triggerClientEvent(source,"checkD",source) end end ) addEvent('check',true) addEventHandler('check',root, function ( ) local accName = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ("user."..accName,aclGetGroup ( "Console" )) or isObjectInACLGroup ("user."..accName,aclGetGroup ( "Level 5" )) or isObjectInACLGroup ("user."..accName,aclGetGroup ( "Level 6" )) or isObjectInACLGroup ("user."..accName,aclGetGroup ( "Head.Admin" )) then triggerClientEvent(source,"checkD",source) end end ) Link to comment
#Untied Posted April 25, 2016 Author Share Posted April 25, 2016 (edited) Edited April 25, 2016 by Guest Link to comment
Ahmed Ly Posted April 25, 2016 Share Posted April 25, 2016 GroupsAdmin = { "Admin", "Level 5", "Level 6", "Head.Admin", } function ( ) local accName = getAccountName (getPlayerAccount(source)) for i, v in ipairs ( GroupsAdmin ) do if isObjectInACLGroup ( "user."..accName, aclGetGroup ( v ) ) then triggerClientEvent(source,"checkD",source) end end end Link to comment
Jupi Posted April 25, 2016 Share Posted April 25, 2016 GroupsAdmin = { "Admin", "Level 5", "Level 6", "Head.Admin", } function ( ) local accName = getAccountName (getPlayerAccount(source)) for i, v in ipairs ( GroupsAdmin ) do if isObjectInACLGroup ( "user."..accName, aclGetGroup ( v ) ) then triggerClientEvent(source,"checkD",source) end end end كودك بيكرر التريقر لو معه اكثر من رتبة GroupsAdmin = { "Admin" = true, "Level 5" = true, "Level 6" = true, "Head.Admin" = true } function isAdmin(Player) for Key, Value in pairs(GroupsAdmin) do if isObjectinACLGroup("user."..getAccountName(getPlayerAccount(Player)), aclGetGroup(Key)) then return true end end return false end function () if isAdmin(player) then triggerClientEvent(player,"checkD",player) end end Link to comment
#|_oskar_|# Posted April 25, 2016 Share Posted April 25, 2016 GroupsAdmin = { [1] = {Group='Admin'}, [2] = {Group='Console'}, [3] = {Group='Level 5'}, [4] = {Group='Level 6'}, [5] = {Group='Head.Admin'} } addEvent('check',true) addEventHandler('check',root, function ( ) for _, v in ipairs(GroupsAdmin) do if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup(v.Group)) then outputChatBox( "Yor Group" .. v.Group,source, 255, 255, 0) triggerClientEvent(source,"checkD",source) return false end end end) Link to comment
Adham Posted April 25, 2016 Share Posted April 25, 2016 فيه خطا طيب هنا. function clear ( thePlayer ) local cuenta = getAccountName( getPlayerAccount(thePlayer) ) if isObjectInACLGroup("user."..cuenta, aclGetGroup("Console")) then spaces(thePlayer) elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 1")) then spaces(thePlayer) elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 2")) then spaces(thePlayer) elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 3")) then spaces(thePlayer) elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 4")) then spaces(thePlayer) elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 5")) then spaces(thePlayer) elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 6")) then spaces(thePlayer) elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Head.Admin")) then spaces(thePlayer) elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Trainee")) then spaces(thePlayer) end end addCommandHandler("77", clear) outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" #0099cc"..getPlayerName(thePlayer).." - Cleard Chat, getRootElement(), 255, 255, 255, true)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