Jw8. Posted June 16, 2019 Share Posted June 16, 2019 (edited) سلآم عليكم يعيال دلحين انا مسوي مود ريبورت مع شأت , طيب ابغى بس يرسل بخاص الريبورت يرسل للادمنية localPlayer elseif source == SENDMesSage then row = guiGridListAddRow ( Message[localPlayer] ) guiGridListSetItemText ( Message[localPlayer],row,1,getPlayerName ( localPlayer ),false,false ) guiGridListSetItemText ( Message[localPlayer],row,2,guiGetText(Edit),false,false ) local textT = guiGetText(Edit) triggerServerEvent("Report:SendText", localPlayer,textT) setTimer(function() guiSetText(Edit,"") row = guiGridListAddRow ( WindowMessage_Grid ) guiGridListSetItemText ( WindowMessage_Grid,row,1,getPlayerName ( localPlayer ),false,false ) guiGridListSetItemText ( WindowMessage_Grid,row,2,textT,false,false ) end,100,1) حد يقدر يفيدني؟ Edited June 16, 2019 by DmAr511 Link to comment
salh Posted June 16, 2019 Share Posted June 16, 2019 (edited) server side? Edited June 16, 2019 by salh Link to comment
Jw8. Posted June 16, 2019 Author Share Posted June 16, 2019 On 16/06/2019 at 18:30, salh said: server side? Expand addEvent("Report:SendText", true) addEventHandler("Report:SendText", root, function(textT) for _,v in ipairs(getPlayersAdmin()) do exports["guimessages"]:outputServer(v, "#ffff00[Report] : #00ff00a new Text has came now from #00ff00"..getPlayerName(source).." ("..textT..")", 255, 255, 255) end end ) Link to comment
#BrosS Posted June 16, 2019 Share Posted June 16, 2019 On 16/06/2019 at 18:33, DmAr511 said: getPlayersAdmin() Expand ممكن تطرح الكود Link to comment
Jw8. Posted June 16, 2019 Author Share Posted June 16, 2019 On 16/06/2019 at 18:46, #BrosS said: ممكن تطرح الكود Expand function getPlayersAdmin () local t = {} for k,v in ipairs ( getElementsByType("player") ) do local acc = getPlayerAccount(v) if acc and not isGuestAccount(acc) then local isAdmin = isPlayerInAllowedGroups(v) if isAdmin then table.insert(t,v) end end end return t end local Groups = {"Level1", "Level2", "Level3", "Level4", "Console", "Co-Manager", "Head-Admin", "Manager", "Developer"} function isPlayerInAllowedGroups(player) if not isGuestAccount(getPlayerAccount(player)) then for k,v in ipairs ( Groups ) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) ) then return true end end end end Link to comment
#BrosS Posted June 16, 2019 Share Posted June 16, 2019 x,D تقدر تختصر كل هذاك هيك addEvent("Report:SendText", true) addEventHandler("Report:SendText", root, function(textT) for _, Players in ipairs ( getElementsByType ( "player" ) ) do if ( hasObjectPermissionTo ( Players, "general.adminpanel" ) ) then exports["guimessages"]:outputServer(Players, "#ffff00[Report] : #00ff00a new Text has came now from #00ff00"..getPlayerName(source).." ("..textT..")", 255, 255, 255) end end end ) احذف جداولك هيهي Link to comment
Jw8. Posted June 16, 2019 Author Share Posted June 16, 2019 On 16/06/2019 at 19:00, #BrosS said: x,D تقدر تختصر كل هذاك هيك addEvent("Report:SendText", true) addEventHandler("Report:SendText", root, function(textT) for _, Players in ipairs ( getElementsByType ( "player" ) ) do if ( hasObjectPermissionTo ( Players, "general.adminpanel" ) ) then exports["guimessages"]:outputServer(Players, "#ffff00[Report] : #00ff00a new Text has came now from #00ff00"..getPlayerName(source).." ("..textT..")", 255, 255, 255) end end end ) احذف جداولك هيهي Expand يبروس الحين هو شغال يرسل كل شي تمام بس ابي المسج مايبين عند الناس كلها Link to comment
Jw8. Posted June 16, 2019 Author Share Posted June 16, 2019 addEvent("Report:SendText", true) addEventHandler("Report:SendText", root, function(textT) for _,v in ipairs(getOnlineAdmins()) do exports["guimessages"]:outputServer(v, "#ffff00[Report] : #00ff00a new Text has came now from #00ff00"..getPlayerName(source).." ("..textT..")", 255, 255, 255) dbExec( dbExec, "INSERT INTO Report VALUES( ? )",textT ) end end ) On 16/06/2019 at 19:04, #BrosS said: الرسالة تظهر عند الأدمنية فقط Expand يب تظهر فقط عند الادمنية ~~ Link to comment
#BrosS Posted June 16, 2019 Share Posted June 16, 2019 ؟._. واستعمالك للداتا غلط شو دخلها بالموضوع Link to comment
Jw8. Posted June 16, 2019 Author Share Posted June 16, 2019 On 16/06/2019 at 19:08, #BrosS said: ؟._. واستعمالك للداتا غلط شو دخلها بالموضوع Expand انو داتا؟ Link to comment
#BrosS Posted June 16, 2019 Share Posted June 16, 2019 On 16/06/2019 at 19:04, DmAr511 said: dbExec( dbExec, "INSERT INTO Report VALUES( ? )",textT ) Expand ! 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