Adham Posted April 29, 2016 Posted April 29, 2016 سلام عليكم الكود لما لما امسح الشات في القريد لست بيمسح لاي حد مش القروبات المحدده؟ وعاوز ال button يقفل ويفتح للقروبات المجدهه سرفر : 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) كلنت 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)
iMr.WiFi..! Posted April 29, 2016 Posted April 29, 2016 انت ما تحققت انه لاعب كونسل او ادمن ابد ’@, -- Server 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 addEvent("clearChat",true) addEventHandler("clearChat",root, function (name) if not isPlayerAdmin(source) then return end triggerClientEvent(source,"clearrows",source,name) end ) -- Client addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then local text = guiGetText(GUIEditor.edit[1]) local name = getPlayerName(source) if text == "clr" then triggerServerEvent("clearChat", localPlayer,name) 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)
Adham Posted April 29, 2016 Author Posted April 29, 2016 حطيط الكود تبعك وغيرت اسم الزرار ما صارت اللوحة تفتح
billal Posted April 29, 2016 Posted April 29, 2016 جرب كدا server 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, "groupAdmins", true ) end end ) addEventHandler("onPlayerLogout",root, function () if isPlayerAdmin(source) then setElementData ( source, "groupAdmins", false ) end end ) addEventHandler("onResourceStart",root, function () for _ , v in ipairs(getElementsByType("player")) do if isPlayerAdmin(v) then setElementData(v, "groupAdmins", 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) ........ Client 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, "groupAdmins", true ) end end ) addEventHandler("onPlayerLogout",root, function () if isPlayerAdmin(source) then setElementData ( source, "groupAdmins", false ) end end ) addEventHandler("onResourceStart",root, function () for _ , v in ipairs(getElementsByType("player")) do if isPlayerAdmin(v) then setElementData(v, "groupAdmins", 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)
iMr.WiFi..! Posted April 29, 2016 Posted April 29, 2016 لعبة عدلت على كودي انا جربه شوف عدل على اسم الجريد ليست
billal Posted April 29, 2016 Posted April 29, 2016 addEventHandler("onClientGUIClick", root, function() localPlayer = player if source == GUIEditor.button[1] then local text = guiGetText(GUIEditor.edit[1]) local name = getPlayerName(source) if text == "clr" then triggerServerEvent("clearChat", localPlayer,name) 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)
iMr.WiFi..! Posted April 29, 2016 Posted April 29, 2016 addEventHandler("onClientGUIClick", root, function() localPlayer = player if source == GUIEditor.button[1] then local text = guiGetText(GUIEditor.edit[1]) local name = getPlayerName(source) if text == "clr" then triggerServerEvent("clearChat", localPlayer,name) 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) مايحتاج تعرف اللوكال بلاير ,@ لانه لوكال بلاير هو سورس
billal Posted April 29, 2016 Posted April 29, 2016 addEventHandler("onClientGUIClick", root, function() localPlayer = player if source == GUIEditor.button[1] then local text = guiGetText(GUIEditor.edit[1]) local name = getPlayerName(source) if text == "clr" then triggerServerEvent("clearChat", localPlayer,name) 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) مايحتاج تعرف اللوكال بلاير ,@ لانه لوكال بلاير هو سورس اها بس شو الفرق لو triggerServerEvent("clearChat", localPlayer,name) لو يخليها كدا شو الفرق؟؟؟ triggerServerEvent("clearChat", Player,name)
Adham Posted April 29, 2016 Author Posted April 29, 2016 addEventHandler("onClientGUIClick",GUIEditor.button[1],function () if guiGetText(GUIEditor.edit[1]) ~= '' then triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) guiSetText (GUIEditor.edit[1], "" ) else guiSetEnabled(GUIEditor.button[1], false) setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[1], true) end end, false) addEvent("sendmessage2",true) addEventHandler("sendmessage2",root, function(Name,Text) local gg = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],gg, 1, Name:gsub("#%x%x%x%x%x%x", "") .. " : " .. Text , false, false) guiGridListSetItemColor(GUIEditor.gridlist[1],gg, 1, 0, 255, 0, 255) if ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then outputChatBox("[support-System] #FF0000"..Name.."#FFFFFF : #00FF00"..guiGetText(GUIEditor.edit[1]),255,255,0,true) end end) 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(GUIEditor.gridlist[1]) then local row = guiGridListAddRow(GUIEditor.gridlist[1]) local text = name:gsub("#%x%x%x%x%x%x","").." Cleared Chat " local t=guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, text, false, false) guiGridListSetItemColor(GUIEditor.gridlist[1], row, 1, 255, 0, 0) end end addEvent("clearrows", true) addEventHandler("clearrows", root, clearChat)
iMr.WiFi..! Posted April 29, 2016 Posted April 29, 2016 addEventHandler("onClientGUIClick",GUIEditor.button[1],function () if guiGetText(GUIEditor.edit[1]) ~= '' then triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) guiSetText (GUIEditor.edit[1], "" ) else guiSetEnabled(GUIEditor.button[1], false) setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[1], true) end end, false) addEvent("sendmessage2",true) addEventHandler("sendmessage2",root, function(Name,Text) local gg = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],gg, 1, Name:gsub("#%x%x%x%x%x%x", "") .. " : " .. Text , false, false) guiGridListSetItemColor(GUIEditor.gridlist[1],gg, 1, 0, 255, 0, 255) if ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then outputChatBox("[support-System] #FF0000"..Name.."#FFFFFF : #00FF00"..guiGetText(GUIEditor.edit[1]),255,255,0,true) end end) 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(GUIEditor.gridlist[1]) then local row = guiGridListAddRow(GUIEditor.gridlist[1]) local text = name:gsub("#%x%x%x%x%x%x","").." Cleared Chat " local t=guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, text, false, false) guiGridListSetItemColor(GUIEditor.gridlist[1], row, 1, 255, 0, 0) end end addEvent("clearrows", true) addEventHandler("clearrows", root, clearChat) addEventHandler("onClientGUIClick",GUIEditor.button[1],function () if guiGetText(GUIEditor.edit[1]) ~= '' then triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) guiSetText (GUIEditor.edit[1], "" ) else guiSetEnabled(GUIEditor.button[1], false) setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[1], true) end end, false) addEvent("sendmessage2",true) addEventHandler("sendmessage2",root, function(Name,Text) local gg = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],gg, 1, Name:gsub("#%x%x%x%x%x%x", "") .. " : " .. Text , false, false) guiGridListSetItemColor(GUIEditor.gridlist[1],gg, 1, 0, 255, 0, 255) if ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then outputChatBox("[support-System] #FF0000"..Name.."#FFFFFF : #00FF00"..guiGetText(GUIEditor.edit[1]),255,255,0,true) end end) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then local text = guiGetText(GUIEditor.edit[1]) local name = getPlayerName(source) if text == "clr" then triggerServerEvent("clearChat", localPlayer,name) end end end end ) function clearChat(name) if guiGridListClear(GridList) then local row = guiGridListAddRow(GridList) guiGridListSetItemText(GridList, row, 1,name.." Cleared Chat ", false, false) guiGridListSetItemColor(GridList, row, 1, 255, 0, 0) end end addEvent("clearrows", true) addEventHandler("clearrows", root, clearChat) واطرح السيرفر
Adham Posted April 29, 2016 Author 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) 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)
iMr.WiFi..! Posted April 29, 2016 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) 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) -- Server 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 addEvent("clearChat",true) addEventHandler("clearChat",root, function (name) if not isPlayerAdmin(source) then return end triggerClientEvent(source,"clearrows",source,name) end )
billal Posted April 29, 2016 Posted April 29, 2016 addEvent("Cleared Chat", true) addEventHandler("Cleared Chat", root, function () guiGridListClear(gridlist) end )
Adham Posted April 29, 2016 Author Posted April 29, 2016 يخي اللوحة ما صارت تفتح من ساعت ما حطيط كودك
Adham Posted April 29, 2016 Author Posted April 29, 2016 طرحت فوق وما اطرح اللوحة لان انا شغلاه تمام لما حطيط كود مستر وايفاي باظت اللوخة
iMr.WiFi..! Posted April 29, 2016 Posted April 29, 2016 طيب جرب كذا , -- Client addEventHandler("onClientGUIClick",GUIEditor.button[1],function () if guiGetText(GUIEditor.edit[1]) ~= '' then triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) guiSetText (GUIEditor.edit[1], "" ) else guiSetEnabled(GUIEditor.button[1], false) setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[1], true) end end, false) addEvent("sendmessage2",true) addEventHandler("sendmessage2",root, function(Name,Text) local gg = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],gg, 1, Name:gsub("#%x%x%x%x%x%x", "") .. " : " .. Text , false, false) guiGridListSetItemColor(GUIEditor.gridlist[1],gg, 1, 0, 255, 0, 255) if ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then outputChatBox("[support-System] #FF0000"..Name.."#FFFFFF : #00FF00"..guiGetText(GUIEditor.edit[1]),255,255,0,true) end end) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then local text = guiGetText(GUIEditor.edit[1]) local name = getPlayerName(source) if text == "clr" then triggerServerEvent("clearChat", localPlayer,name) end end end end ) function clearChat(name) guiGridListClear(GridList) local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], row, 1," "..name.." Cleared Chat ", false, false) guiGridListSetItemColor(GUIEditor.gridlist[1], row, 1, 255, 0, 0) end addEvent("clearrows", true) addEventHandler("clearrows", root, clearChat)
billal Posted April 29, 2016 Posted April 29, 2016 طيب جرب كذا , -- Client addEventHandler("onClientGUIClick",GUIEditor.button[1],function () if guiGetText(GUIEditor.edit[1]) ~= '' then triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) guiSetText (GUIEditor.edit[1], "" ) else guiSetEnabled(GUIEditor.button[1], false) setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[1], true) end end, false) addEvent("sendmessage2",true) addEventHandler("sendmessage2",root, function(Name,Text) local gg = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],gg, 1, Name:gsub("#%x%x%x%x%x%x", "") .. " : " .. Text , false, false) guiGridListSetItemColor(GUIEditor.gridlist[1],gg, 1, 0, 255, 0, 255) if ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then outputChatBox("[support-System] #FF0000"..Name.."#FFFFFF : #00FF00"..guiGetText(GUIEditor.edit[1]),255,255,0,true) end end) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then local text = guiGetText(GUIEditor.edit[1]) local name = getPlayerName(source) if text == "clr" then triggerServerEvent("clearChat", localPlayer,name) end end end end ) function clearChat(name) guiGridListClear(GridList) local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], row, 1," "..name.." Cleared Chat ", false, false) guiGridListSetItemColor(GUIEditor.gridlist[1], row, 1, 255, 0, 0) end addEvent("clearrows", true) addEventHandler("clearrows", root, clearChat) اند زائدة سطر33 addEventHandler("onClientGUIClick",GUIEditor.button[1],function () if guiGetText(GUIEditor.edit[1]) ~= '' then triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) guiSetText (GUIEditor.edit[1], "" ) else guiSetEnabled(GUIEditor.button[1], false) setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[1], true) end end, false) addEvent("sendmessage2",true) addEventHandler("sendmessage2",root, function(Name,Text) local gg = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],gg, 1, Name:gsub("#%x%x%x%x%x%x", "") .. " : " .. Text , false, false) guiGridListSetItemColor(GUIEditor.gridlist[1],gg, 1, 0, 255, 0, 255) if ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then outputChatBox("[support-System] #FF0000"..Name.."#FFFFFF : #00FF00"..guiGetText(GUIEditor.edit[1]),255,255,0,true) end end) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then local text = guiGetText(GUIEditor.edit[1]) local name = getPlayerName(source) if text == "clr" then triggerServerEvent("clearChat", localPlayer,name) end end end ) function clearChat(name) guiGridListClear(GridList) local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], row, 1," "..name.." Cleared Chat ", false, false) guiGridListSetItemColor(GUIEditor.gridlist[1], row, 1, 255, 0, 0) end addEvent("clearrows", true) addEventHandler("clearrows", root, clearChat)
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