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 2 minutes ago, salh said: server side? 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 11 minutes ago, DmAr511 said: getPlayersAdmin() ممكن تطرح الكود Link to comment
Jw8. Posted June 16, 2019 Author Share Posted June 16, 2019 1 minute ago, #BrosS said: ممكن تطرح الكود 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 1 minute ago, #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 ) احذف جداولك هيهي يبروس الحين هو شغال يرسل كل شي تمام بس ابي المسج مايبين عند الناس كلها 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 ) Just now, #BrosS said: الرسالة تظهر عند الأدمنية فقط يب تظهر فقط عند الادمنية ~~ 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 2 minutes ago, #BrosS said: ؟._. واستعمالك للداتا غلط شو دخلها بالموضوع انو داتا؟ Link to comment
#BrosS Posted June 16, 2019 Share Posted June 16, 2019 28 minutes ago, DmAr511 said: dbExec( dbExec, "INSERT INTO Report VALUES( ? )",textT ) ! 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