Jump to content

# حفظ القريد ليست


Recommended Posts

سلآم عليكم يعيال دلحين انا مسوي مود ريبورت مع شأت ,

طيب ابغى بس يرسل بخاص الريبورت يرسل للادمنية 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 by DmAr511
Link to post
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 post
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 post

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 post
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 post
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 post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...