Sign in to follow this  
DmaR..x

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

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

Share this post


Link to post

server side?

 

Edited by salh

Share this post


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
)

 

Share this post


Link to post
11 minutes ago, DmAr511 said:

getPlayersAdmin()

ممكن تطرح الكود

Share this post


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

 

Share this post


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
)

احذف جداولك هيهي

 

Share this post


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
)

احذف جداولك هيهي

 

يبروس الحين هو شغال يرسل كل شي تمام بس ابي المسج مايبين عند الناس كلها

Share this post


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:

الرسالة تظهر عند الأدمنية فقط

يب تظهر فقط عند الادمنية ~~

Share this post


Link to post

؟._.

واستعمالك للداتا غلط شو دخلها بالموضوع

Share this post


Link to post
2 minutes ago, #BrosS said:

؟._.

واستعمالك للداتا غلط شو دخلها بالموضوع 

انو داتا؟

Share this post


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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.