nxFairlywell Posted April 29, 2016 Share Posted April 29, 2016 كذا؟ groupAdmins = {"Console","Admin"} -- حط القروبات اللي تمسح و يكون البوتون عندها مفتوح function isPlayerAdmin( player ) local aPlayerAccount = getPlayerAccount( player ) if ( not aPlayerAccount or isGuestAccount( aPlayerAccount ) ) then return false end local aPlayerAccountName=getAccountName(aPlayerAccount) for _ , Group in ipairs ( groupAdmins ) do if isObjectInACLGroup("user."..aPlayerAccountName, aclGetGroup(Group)) then return true end end end addEventHandler("onPlayerLogin",root, function () if isPlayerAdmin(source) setElementData ( source ) end end ) if getElementData(source) guiSetEnabled(button, true) addEventHandler("onResourceStart",root, function () for _ , players in ipairs(getElementsByType("player")) do -- جيب كل اللاعبين if isPlayerAdmin(v) - setElementData(v) end end) انت نسخت الشرح بس وحطيته سيرفر groupAdmins = {"Console","Admin"} -- حط القروبات اللي تمسح و يكون البوتون عندها مفتوح function isPlayerAdmin( player ) local aPlayerAccount = getPlayerAccount( player ) if ( not aPlayerAccount or isGuestAccount( aPlayerAccount ) ) then return false end local aPlayerAccountName=getAccountName(aPlayerAccount) for _ , Group in ipairs ( groupAdmins ) do if isObjectInACLGroup("user."..aPlayerAccountName, aclGetGroup(Group)) then return true end end end addEventHandler("onPlayerLogin",root, function () if isPlayerAdmin(source) then setElementData ( source, "isAdmin", true ) end end ) addEventHandler("onPlayerLogout",root, function () if isPlayerAdmin(source) then setElementData ( source, "isAdmin", false ) end end ) addEventHandler("onResourceStart",root, function () for _ , v in ipairs(getElementsByType("player")) do -- جيب كل اللاعبين if isPlayerAdmin(v) then setElementData(v, "isAdmin", true) end end end ) function clearChat() local name = getPlayerName(source) for _ , v in ipairs(getElementsByType("player")) do triggerClientEvent(v, "clearrows", v, name) end end addEvent("clearChat", true) addEventHandler("clearChat", root, clearChat) كلنت دور بالكلنت على كلمة GridList و استبدلها بإسم القريد لست حق الشات addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then local text = guiGetText(GUIEditor.edit[1]) if getElementData(localPlayer, "isAdmin") then if text == "clr" then triggerServerEvent("clearChat", localPlayer) end end end end ) function clearChat(name) if guiGridListClear(GridList) then local row = guiGridListAddRow(GridList) local text = name:gsub("#%x%x%x%x%x%x","").." Cleared Chat " local t=guiGridListSetItemText(GridList, row, 1, text, false, false) guiGridListSetItemColor(GridList, row, 1, 255, 0, 0) end end addEvent("clearrows", true) addEventHandler("clearrows", root, clearChat) Link to comment
Adham Posted April 29, 2016 Author Share Posted April 29, 2016 ما شتغلت انا كونسل وبكتب clr ما يتمسح شي Link to comment
nxFairlywell Posted April 29, 2016 Share Posted April 29, 2016 ما شتغلت انا كونسل وبكتب clr ما يتمسح شي استبدلت القريد لست ؟ و اسم البوتون حق الارسال و الايديت ؟ Link to comment
Adham Posted April 29, 2016 Author Share Posted April 29, 2016 اشتغلت بس ابي تعملي البيتون يتقفل ويتفتح ل النا محدد القروبات Link to comment
nxFairlywell Posted April 29, 2016 Share Posted April 29, 2016 اشتغلت بس ابي تعملي البيتون يتقفل ويتفتح ل النا محدد القروبات اي بوتون ؟ سوي كذا يوم يفتح اللوحه يوم تحط للوحة كذا guiSetVisible(اسم اللوحة,true) يوم تسوي ذي ^ حط ذا ال3 اسطر تحتها if getElementData(localPlayer, "isAdmin") then guiSetEnabled(اسم الزر الي تبي تفتحه للادمن,true) end طبعا لازم تسوي guiSetEnabled(اسم الزر,false) بالحدث ذا onClientResourceStart يعني حطه مع اكواد اللوحة Link to comment
Adham Posted April 29, 2016 Author Share Posted April 29, 2016 كذا؟ وملحوظه ذا سرفر addEventHandler("onClientResourceStart",root, fuction () if getElementData(localPlayer, "isAdmin") then guiSetEnabled(button,true) end end ) Link to comment
nxFairlywell Posted April 29, 2016 Share Posted April 29, 2016 كذا؟وملحوظه ذا سرفر addEventHandler("onClientResourceStart",root, fuction () if getElementData(localPlayer, "isAdmin") then guiSetEnabled(button,true) end end ) سلامات اسم الحدث كلنت !! تحطه سيرفر ليه , حطه بكلنت و عدل fuction > function وعدل ذا guiSetEnabled(button,true) > guiSetEnabled(button,false) Link to comment
Adham Posted April 29, 2016 Author Share Posted April 29, 2016 ول حطيطه قفل للكل addEventHandler("onClientResourceStart",root, function () if getElementData(localPlayer, "isAdmin") then guiSetEnabled(GUIEditor.button[3],false) end end ) Link to comment
nxFairlywell Posted April 29, 2016 Share Posted April 29, 2016 ولحطيطه قفل للكل addEventHandler("onClientResourceStart",root, function () if getElementData(localPlayer, "isAdmin") then guiSetEnabled(GUIEditor.button[3],false) end end ) طيب يا بطل هو قفل للكل ماعدا الادمنية الحين لما تفتح اللوحة تسوي تحقق اذا كان ادمن تفتح له الزر Link to comment
nxFairlywell Posted April 29, 2016 Share Posted April 29, 2016 ممكن تسوهالي ههههههههههههههه يا ابن الناس انا وش جالس اسوي من امس ؟ Link to comment
#Soking Posted April 29, 2016 Share Posted April 29, 2016 جب الكود حق فتح الوحه وانا بعدلك عليه كاملا Link to comment
s7BaT Posted May 4, 2016 Share Posted May 4, 2016 </p>\n<blockquote data-ipsquote=\"\" class=\"ipsQuote\" data-ipsquote-username=\"Hustlers\" data-cite=\"Hustlers\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"85128\" data-ipsquote-contentclass=\"forums_Topic\"><div>انا ابي اعمل لما يضط علي Send<p>وما كتب شي بلايديت</p>\n<p>ولما كتب شي</p>\n<p>وضعط علي البيتون</p>\n<p>تبعت عادي</p>\n<p>الكود بتاعي اهو اليبعت رساله في القريد لست من بيتون send فهمت قصدك يعني اذا ماكتب شي في الايديت مايضيف شي في القريد لست ويختفي الزر ويرجع واذا كتب يضيف الكلام الي في الايديت للقريد لست وما يختفي الزر جديد واول رد لي مدري مساعده لكن لا يغرك خبره 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