SaedAmer Posted June 21, 2016 Share Posted June 21, 2016 السلام عليكم ده شات ادمن بس لما حد يكتب تظه للكونسول و ما تظهر لباقي الدمن و لما الكونسول يكتب ما تظهر للادمن تظهر له فقط عاوزها تظهر لكا الادمن groups = { "Console", "Admin", "SuperModerator", "Moderator", "Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6", "Head.Admin", "Owner", "Leve16Plus", "Level5Plus", "Level4Plus", "Level3Plus", "Level2Plus", "Level1Plus", "AdminChat" } addCommandHandler("AdminChat", function(player,cmd,...) for theKey,theGroup in ipairs(groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(theGroup)) then for theKey,theGroup in ipairs(groups) do for theKey,thePlayer in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup(theGroup)) then outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..table.concat({...}," "),thePlayer,255,0,0,true) end end return end end end end ) addEventHandler("onResourceStart",root, function() for theKey,thePlayer in ipairs(getElementsByType("player")) do bindKey(thePlayer,"[","down","chatbox","AdminChat") end end ) Link to comment
MR.S3D Posted June 21, 2016 Share Posted June 21, 2016 groups = { "Console", "Admin", "SuperModerator", "Moderator", "Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6", "Head.Admin", "Owner", "Leve16Plus", "Level5Plus", "Level4Plus", "Level3Plus", "Level2Plus", "Level1Plus", "AdminChat" } addCommandHandler("AdminChat", function(player,cmd,...) local msg = table.concat({...}} for theKey,theGroup in ipairs(groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(theGroup)) then for theKey,theGroup in ipairs(groups) do for theKey,thePlayer in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup(theGroup)) then outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..msg," "),thePlayer,255,0,0,true) end end end break end end end ) addEventHandler("onResourceStart",root, function() for theKey,thePlayer in ipairs(getElementsByType("player")) do bindKey(thePlayer,"[","down","chatbox","AdminChat") end end ) addEventHandler("onPlayerJoin",root, function() bindKey(source,"[","down","chatbox","AdminChat") end ) Link to comment
SaedAmer Posted June 21, 2016 Author Share Posted June 21, 2016 سعد كودك فيه اخطأ unexpected symbol near ',' 339 '' expected near 'end' 340 '' expected near 'end' 341 '' expected near 'end' 342 '' expected near 'end' 345 '' expected near 'end' 346 no loop to break near 'end' 344 unexpected symbol near ')' 347 ')' expected near '}' 333 Link to comment
Mr.CoR Posted June 21, 2016 Share Posted June 21, 2016 (edited) groups = { "Console", "Admin", "SuperModerator", "Moderator", "Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6", "Head.Admin", "Owner", "Leve16Plus", "Level5Plus", "Level4Plus", "Level3Plus", "Level2Plus", "Level1Plus", "AdminChat" } addCommandHandler("AdminChat", function(player,cmd,...) local msg = table.concat({...}) for theKey,theGroup in ipairs(groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(theGroup)) then for theKey,theGroup in ipairs(groups) do for theKey,thePlayer in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup(theGroup)) then outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..msg,thePlayer,255,0,0,true) end end end end break end end ) addEventHandler("onResourceStart",root, function() for theKey,thePlayer in ipairs(getElementsByType("player")) do bindKey(thePlayer,"[","down","chatbox","AdminChat") end end ) addEventHandler("onPlayerJoin",root, function() bindKey(source,"[","down","chatbox","AdminChat") end ) جرب الحين طيب -- تم التحديث Edited June 21, 2016 by Guest Link to comment
فاّرس Posted June 21, 2016 Share Posted June 21, 2016 ^ msg," ", سطر 33 عندك فاصله وعلامتين تنصيص زايده + ممكن تعلموني ليه مستخدمين لوبين للقروبات؟ مو لوب واحد يكفي؟؟ Link to comment
Mr.CoR Posted June 21, 2016 Share Posted June 21, 2016 ^ msg," ", سطر 33 عندك فاصله وعلامتين تنصيص زايده+ ممكن تعلموني ليه مستخدمين لوبين للقروبات؟ مو لوب واحد يكفي؟؟ مادري انا عدلت على كود سعد Link to comment
MR.S3D Posted June 21, 2016 Share Posted June 21, 2016 (edited) groups = { "Console", "Admin", "SuperModerator", "Moderator", "Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6", "Head.Admin", "Owner", "Leve16Plus", "Level5Plus", "Level4Plus", "Level3Plus", "Level2Plus", "Level1Plus", "AdminChat" } addCommandHandler("AdminChat", function(player,cmd,...) local msg = table.concat({...}) for theKey,theGroup in ipairs(groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(theGroup)) then for theKey,theGroup in ipairs(groups) do for theKey,thePlayer in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup(theGroup)) then outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..msg,thePlayer,255,0,0,true) end end end break end end end ) addEventHandler("onResourceStart",root, function() for theKey,thePlayer in ipairs(getElementsByType("player")) do bindKey(thePlayer,"[","down","chatbox","AdminChat") end end ) addEventHandler("onPlayerJoin",root, function() bindKey(source,"[","down","chatbox","AdminChat") end ) Edited June 21, 2016 by Guest Link to comment
MR.S3D Posted June 21, 2016 Share Posted June 21, 2016 ^ msg," ", سطر 33 عندك فاصله وعلامتين تنصيص زايده+ ممكن تعلموني ليه مستخدمين لوبين للقروبات؟ مو لوب واحد يكفي؟؟ اللوب الأول للتحقق من اللاعب اللي هو انت الأدمن انك موجود بالقروب ولا لا عشان يسمح بالدخول للوب الثاني واللوب الثاني للتحقق من اللاعبين انهم موجودين بالقروبات ثم ارسال اليهم Link to comment
فاّرس Posted June 21, 2016 Share Posted June 21, 2016 ووش بيفرق لو سويت كذا؟ addCommandHandler("AdminChat", function(player,cmd,...) local msg = table.concat({...}) for theKey,theGroup in ipairs(groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(theGroup)) then for theKey,thePlayer in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup(theGroup)) then outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..msg,thePlayer,255,0,0,true) end end end end end ) + } عندك خطأ بالسطر26 حط قوس بدل Link to comment
MR.S3D Posted June 22, 2016 Share Posted June 22, 2016 ووش بيفرق لو سويت كذا؟ addCommandHandler("AdminChat", function(player,cmd,...) local msg = table.concat({...}) for theKey,theGroup in ipairs(groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(theGroup)) then for theKey,thePlayer in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup(theGroup)) then outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..msg,thePlayer,255,0,0,true) end end end end end ) + } عندك خطأ بالسطر26 حط قوس بدل كذا راح يلف على نص القوروبات ولما يوصل للاعبين قدها انتهى اللوب Link to comment
فاّرس Posted June 22, 2016 Share Posted June 22, 2016 مم زمان يوم كان عندي سيرفر كنت اسوي كذا وكان يضبط لكل اللاعبين ومايجي اي خطأ, ع العموم مشكور ع التوضيح. Link to comment
MR.S3D Posted June 22, 2016 Share Posted June 22, 2016 مم زمان يوم كان عندي سيرفر كنت اسوي كذا وكان يضبط لكل اللاعبين ومايجي اي خطأ, ع العموم مشكور ع التوضيح. بعدين على فكرة انا مستخدم انه لما يوصل لقروب اللاعب يتوقف اللوب وثم يدخل على جميع القروبات ... لو فرضنا كلامك مثل ماقلت وانا مثلا كنت برتبة رقم 5 باللوب كذا راح يدخل على جميع الااعبين برتبه رقم 6 الى الاخير وماراح برجع للرتبه الأولى Link to comment
SaedAmer Posted June 22, 2016 Author Share Posted June 22, 2016 groups = { "Console", "Admin", "SuperModerator", "Moderator", "Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6", "Head.Admin", "Owner", "Leve16Plus", "Level5Plus", "Level4Plus", "Level3Plus", "Level2Plus", "Level1Plus", "AdminChat" } addCommandHandler("AdminChat", function(player,cmd,...) local msg = table.concat({...}) for theKey,theGroup in ipairs(groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(theGroup)) then for theKey,theGroup in ipairs(groups) do for theKey,thePlayer in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup(theGroup)) then outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..msg,thePlayer,255,0,0,true) end end end break end end end ) addEventHandler("onResourceStart",root, function() for theKey,thePlayer in ipairs(getElementsByType("player")) do bindKey(thePlayer,"[","down","chatbox","AdminChat") end end ) addEventHandler("onPlayerJoin",root, function() bindKey(source,"[","down","chatbox","AdminChat") end ) الكلام يتكرر ياكفو Link to comment
MR.S3D Posted June 22, 2016 Share Posted June 22, 2016 groups = { "Console", "Admin", "SuperModerator", "Moderator", "Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6", "Head.Admin", "Owner", "Leve16Plus", "Level5Plus", "Level4Plus", "Level3Plus", "Level2Plus", "Level1Plus", "AdminChat" } addCommandHandler("AdminChat", function(player,cmd,...) local msg = table.concat({...}) for theKey,theGroup in ipairs(groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(theGroup)) then for theKey,theGroup in ipairs(groups) do for theKey,thePlayer in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup(theGroup)) then outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..msg,thePlayer,255,0,0,true) end end end break end end end ) addEventHandler("onResourceStart",root, function() for theKey,thePlayer in ipairs(getElementsByType("player")) do bindKey(thePlayer,"[","down","chatbox","AdminChat") end end ) addEventHandler("onPlayerJoin",root, function() bindKey(source,"[","down","chatbox","AdminChat") end ) الكلام يتكرر ياكفو ربما بسبب وجود اللاعب في اكثر من قروب Link to comment
Adham Posted June 22, 2016 Share Posted June 22, 2016 admins = { "Console", "Admin", "SuperModerator", "Moderator", "Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6", "Head.Admin", "Owner", "Leve16Plus", "Level5Plus", "Level4Plus", "Level3Plus", "Level2Plus", "Level1Plus", "AdminChat" } addCommandHandler("AdminChat", function(player,cmd,...) local acc = getPlayerAccount(player) if not isGuestAccount ( acc ) then end for i, v in ipairs ( admins ) do if isObjectInACLGroup ( "user."..getAccountName ( acc ), aclGetGroup ( v ) ) then local msg = table.concat ( {...}, " " ) for i, v in ipairs ( getElementsByType ( "player" ) ) do outputChatBox("(ADMIN) "..getPlayerName(player) .. ": #ffffff".. msg,v, 255, 0, 0, true) end end break end end end end ) addEventHandler("onResourceStart",root, function() for theKey,thePlayer in ipairs(getElementsByType("player")) do bindKey(thePlayer,"[","down","chatbox","AdminChat") end end ) addEventHandler ( "onPlayerJoin", root, function ( ) bindKey(source,"[","down","chatbox","AdminChat") end ) Link to comment
SaedAmer Posted June 22, 2016 Author Share Posted June 22, 2016 groups = { "Console", "Admin", "SuperModerator", "Moderator", "Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6", "Head.Admin", "Owner", "Leve16Plus", "Level5Plus", "Level4Plus", "Level3Plus", "Level2Plus", "Level1Plus", "AdminChat" } addCommandHandler("AdminChat", function(player,cmd,...) local msg = table.concat({...}) for theKey,theGroup in ipairs(groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(theGroup)) then for theKey,theGroup in ipairs(groups) do for theKey,thePlayer in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup(theGroup)) then outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..msg,thePlayer,255,0,0,true) end end end break end end end ) addEventHandler("onResourceStart",root, function() for theKey,thePlayer in ipairs(getElementsByType("player")) do bindKey(thePlayer,"[","down","chatbox","AdminChat") end end ) addEventHandler("onPlayerJoin",root, function() bindKey(source,"[","down","chatbox","AdminChat") end ) الكلام يتكرر ياكفو ربما بسبب وجود اللاعب في اكثر من قروب كلامك صحيح Link to comment
MR.S3D Posted June 22, 2016 Share Posted June 22, 2016 groups = { "Console", "Admin", "SuperModerator", "Moderator", "Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6", "Head.Admin", "Owner", "Leve16Plus", "Level5Plus", "Level4Plus", "Level3Plus", "Level2Plus", "Level1Plus", "AdminChat" } addCommandHandler("AdminChat", function(player,cmd,...) local msg = table.concat({...}) for theKey,theGroup in ipairs(groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(theGroup)) then outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..msg,player,255,0,0,true) for theKey,thePlayer in ipairs(getElementsByType("player")) do if thePlayer ~= player then for theKey,theGroup in ipairs(groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup(theGroup)) then outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..msg,thePlayer,255,0,0,true) break end end end end break end end end ) addEventHandler("onResourceStart",root, function() for theKey,thePlayer in ipairs(getElementsByType("player")) do bindKey(thePlayer,"[","down","chatbox","AdminChat") end end ) addEventHandler("onPlayerJoin",root, function() bindKey(source,"[","down","chatbox","AdminChat") end ) Link to comment
SaedAmer Posted June 22, 2016 Author Share Posted June 22, 2016 groups = { "Console", "Admin", "SuperModerator", "Moderator", "Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6", "Head.Admin", "Owner", "Leve16Plus", "Level5Plus", "Level4Plus", "Level3Plus", "Level2Plus", "Level1Plus", "AdminChat" } addCommandHandler("AdminChat", function(player,cmd,...) local msg = table.concat({...}) for theKey,theGroup in ipairs(groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(theGroup)) then for theKey,theGroup in ipairs(groups) do for theKey,thePlayer in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup(theGroup)) then outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..msg,thePlayer,255,0,0,true) end end end break end end end ) addEventHandler("onResourceStart",root, function() for theKey,thePlayer in ipairs(getElementsByType("player")) do bindKey(thePlayer,"[","down","chatbox","AdminChat") end end ) addEventHandler("onPlayerJoin",root, function() bindKey(source,"[","down","chatbox","AdminChat") end ) الكلام يتكرر ياكفو ربما بسبب وجود اللاعب في اكثر من قروب الكلام يكرر حتي لو معي رتبة واحده + ما يعمل مسافات بين الكلام مثلا انا كتبت اهلا بك يظهره بالشات كده اهلابك Link to comment
MR.S3D Posted June 22, 2016 Share Posted June 22, 2016 groups = { "Console", "Admin", "SuperModerator", "Moderator", "Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6", "Head.Admin", "Owner", "Leve16Plus", "Level5Plus", "Level4Plus", "Level3Plus", "Level2Plus", "Level1Plus", "AdminChat" } addCommandHandler("AdminChat", function(player,cmd,...) local msg = table.concat({...}, " ") for theKey,theGroup in ipairs(groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(theGroup)) then outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..msg,player,255,0,0,true) for theKey,thePlayer in ipairs(getElementsByType("player")) do if thePlayer == player then else for theKey,theGroup in ipairs(groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup(theGroup)) then outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..msg,thePlayer,255,0,0,true) break end end end end break end end end ) addEventHandler("onResourceStart",root, function() for theKey,thePlayer in ipairs(getElementsByType("player")) do bindKey(thePlayer,"[","down","chatbox","AdminChat") end end ) addEventHandler("onPlayerJoin",root, function() bindKey(source,"[","down","chatbox","AdminChat") 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