Jump to content

ينقفل العاجل ولا يقدر آي احد يكتب لما يجي شخص يكتب العاجل يطلع بشات العاجل مقفل حليا لازم يرجع الصاحب السيرفر ويكتب الكلمه على شن يفتح xDسلام عليكم بدي كود يقفل العاجل كيف ؟ لما تكتب بي اف8 مثال


Recommended Posts

ينقفل العاجل ولا يقدر آي احد يكتب لما يجي شخص يكتب العاجل يطلع بشات العاجل مقفل حليا لازم يرجع الصاحب السيرفر ويكتب الكلمه على شن يفتح xDسلام عليكم بدي كود يقفل العاجل كيف ؟ لما تكتب بي اف8 مثال 

ردو ي مبرمجين

Link to comment
  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

23 hours ago, HelpGuys said:

ينقفل العاجل ولا يقدر آي احد يكتب لما يجي شخص يكتب العاجل يطلع بشات العاجل مقفل حليا لازم يرجع الصاحب السيرفر ويكتب الكلمه على شن يفتح xDسلام عليكم بدي كود يقفل العاجل كيف ؟ لما تكتب بي اف8 مثال 

ردو ي مبرمجين

اول شي قسم غلط المفروض تحطو في قسم البرمجه

تاني شي  اطرح العاجل حقك

Link to comment

local sX, sY = guiGetScreenSize ()

addEventHandler("onClientRender", root, function ()
    if ( getElementData ( resourceRoot, "Have_" ) == true ) then
        local Lines = getChatboxLayout ()["chat_lines"]
        if ( Lines <= 10 ) then
            Lines = Lines + 1
        elseif ( Lines >= 20 ) then
            Lines = Lines - 1
        else
            Lines = Lines
        end
        if ( getElementData ( resourceRoot, "Msg_" ) == "delete" ) then
            setElementData ( resourceRoot, "Have_", false )
        else
         dxDrawBorderedText ( "#1a75ffAdmin : #FFFFFF" .. getElementData ( resourceRoot, "Msg_" ).. "", 33, 221, 205, 242, tocolor(255, 255, 255, 255), 1.0, "default-bold", "left", "top", true, false, true, true, true)
        end
    end
end)
bindKey("u", "down", "chatbox","IM")

function dxDrawBorderedText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, color2 )
    local wh = 1
    local msg_gsub = text:gsub ( '#%x%x%x%x%x%x', '' )
    dxDrawText ( msg_gsub, x - wh, y - wh, w - wh, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black
    dxDrawText ( msg_gsub, x + wh, y - wh, w + wh, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x - wh, y + wh, w - wh, h + wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x + wh, y + wh, w + wh, h + wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x - wh, y, w - wh, h, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x + wh, y, w + wh, h, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x, y - wh, w, h - wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x, y + wh, w, h + wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, color2 )
end

 

________________________________________________________________________________________________________________________

local Groups = { "Console", "AL-3GeD" }

function isPlayerAdmin(player)
    for k,v in ipairs ( Groups ) do
        if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) ) then
            return true
        end
    end
end

addCommandHandler("IM", function ( player, cmd, ... )
    if not ( isGuestAccount ( getPlayerAccount ( player ) ) ) then
        if ( isPlayerAdmin ( player ) ) then
            local msg = {...}
            local message = table.concat(msg, " ")
            setElementData ( resourceRoot, "Have_", true )
            setElementData ( resourceRoot, "Msg_", message )
            if ( getElementData ( player, "Name" ) and getElementData ( player, "Name" ) ~= false ) then
                setElementData ( resourceRoot, "By_", getElementData ( player, "Name" ))
            else
                setElementData ( resourceRoot, "By_", getPlayerName ( player ))
            end
        else
        end
    else
    end
end)

48 minutes ago, #x1AhMeD,-09 said:

اول شي قسم غلط المفروض تحطو في قسم البرمجه

تاني شي  اطرح العاجل حقك

ممكن تعطيني كود احطه كود كلمة تكتبها في اف8 تكون عبر سريال والكلمه هاذي لما تكتب في اف8 مرح يقدر اي شخص يكتب فالعاجل ححتى لو كنت انت
زي كذا

#Msg : العاجل مغلق حليا ..

Edited by HelpGuys
Link to comment
On 1/7/2018 at 04:43, HelpGuys said:

local sX, sY = guiGetScreenSize ()

addEventHandler("onClientRender", root, function ()
    if ( getElementData ( resourceRoot, "Have_" ) == true ) then
        local Lines = getChatboxLayout ()["chat_lines"]
        if ( Lines <= 10 ) then
            Lines = Lines + 1
        elseif ( Lines >= 20 ) then
            Lines = Lines - 1
        else
            Lines = Lines
        end
        if ( getElementData ( resourceRoot, "Msg_" ) == "delete" ) then
            setElementData ( resourceRoot, "Have_", false )
        else
         dxDrawBorderedText ( "#1a75ffAdmin : #FFFFFF" .. getElementData ( resourceRoot, "Msg_" ).. "", 33, 221, 205, 242, tocolor(255, 255, 255, 255), 1.0, "default-bold", "left", "top", true, false, true, true, true)
        end
    end
end)
bindKey("u", "down", "chatbox","IM")

function dxDrawBorderedText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, color2 )
    local wh = 1
    local msg_gsub = text:gsub ( '#%x%x%x%x%x%x', '' )
    dxDrawText ( msg_gsub, x - wh, y - wh, w - wh, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black
    dxDrawText ( msg_gsub, x + wh, y - wh, w + wh, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x - wh, y + wh, w - wh, h + wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x + wh, y + wh, w + wh, h + wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x - wh, y, w - wh, h, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x + wh, y, w + wh, h, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x, y - wh, w, h - wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x, y + wh, w, h + wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, color2 )
end

 

________________________________________________________________________________________________________________________

local Groups = { "Console", "AL-3GeD" }

function isPlayerAdmin(player)
    for k,v in ipairs ( Groups ) do
        if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) ) then
            return true
        end
    end
end

addCommandHandler("IM", function ( player, cmd, ... )
    if not ( isGuestAccount ( getPlayerAccount ( player ) ) ) then
        if ( isPlayerAdmin ( player ) ) then
            local msg = {...}
            local message = table.concat(msg, " ")
            setElementData ( resourceRoot, "Have_", true )
            setElementData ( resourceRoot, "Msg_", message )
            if ( getElementData ( player, "Name" ) and getElementData ( player, "Name" ) ~= false ) then
                setElementData ( resourceRoot, "By_", getElementData ( player, "Name" ))
            else
                setElementData ( resourceRoot, "By_", getPlayerName ( player ))
            end
        else
        end
    else
    end
end)

ممكن تعطيني كود احطه كود كلمة تكتبها في اف8 تكون عبر سريال والكلمه هاذي لما تكتب في اف8 مرح يقدر اي شخص يكتب فالعاجل ححتى لو كنت انت
زي كذا

#Msg : العاجل مغلق حليا ..

--#Client Side
function dxDrawBorderedText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, color2 )
    local wh = 1
    local msg_gsub = text:gsub ( '#%x%x%x%x%x%x', '' )
    dxDrawText ( msg_gsub, x - wh, y - wh, w - wh, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black
    dxDrawText ( msg_gsub, x + wh, y - wh, w + wh, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x - wh, y + wh, w - wh, h + wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x + wh, y + wh, w + wh, h + wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x - wh, y, w - wh, h, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x + wh, y, w + wh, h, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x, y - wh, w, h - wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x, y + wh, w, h + wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, color2 )
end

addEventHandler("onClientRender", root,
	function ()
		local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "N/A"}
		local text = data[2]
		if data[1] then
			if data[2] == "closed" then
				text = "العاجل مغلق"
			else
				text = data[2]
			end
			if data[1] then
				dxDrawBorderedText("#1a75ffAdmin : #FFFFFF"..text, 33, 221, 205, 242, tocolor(255, 255, 255, 255), 1.0, "default-bold", "left", "top", true, false, true, true, true)
			end
		end
	end
)
-------#Server Side
local Groups = { "Console", "AL-3GeD" }
local Serials = {
	["سريالك"] = true,
	["سريالك2"] = true
}

function isPlayerAdmin(player)
    for k,v in ipairs ( Groups ) do
		if aclGetGroup(v) then
			if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) then
				return true
			end
		end
	end
end

addEventHandler("onResourceStart", resourceRoot,
	function()
		for _,player in ipairs(getElementsByType("player")) do
			if isPlayerAdmin(player) then
				bindKey(player, "u", "down", "chatbox", "IM")
			end
		end
	end
)


addCommandHandler("IM", 
	function(player,_,...)
		local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "N/A"}
		if not isGuestAccount(getPlayerAccount(player)) then
			if isPlayerAdmin(player) then
				if data[2] ~= "closed" then
					local message = table.concat({...}, " ")
					setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, message, (getElementData(player, "Name") or getPlayerName(player))})
				else
					outputChatBox("العاجل مغلق", player, 255, 0, 0, true)
				end
			end
		end
	end
)

addCommandHandler("switch",
	function(player)
		if Serials[getPlayerSerial(player)] then
			local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "N/A"}
			if data[2] ~= "closed" then
				setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, "closed", getPlayerName(player)})
				outputChatBox("تم اغلاق العاجل", player, 255, 0, 0, true)
			else
				setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, "", getPlayerName(player)})
				outputChatBox("تم فتح العاجل", player, 0, 255, 0, true)
			end
		end
	end
)

 

Link to comment
1 hour ago, #x1AhMeD,-09 said:

--#Client Side
function dxDrawBorderedText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, color2 )
    local wh = 1
    local msg_gsub = text:gsub ( '#%x%x%x%x%x%x', '' )
    dxDrawText ( msg_gsub, x - wh, y - wh, w - wh, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black
    dxDrawText ( msg_gsub, x + wh, y - wh, w + wh, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x - wh, y + wh, w - wh, h + wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x + wh, y + wh, w + wh, h + wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x - wh, y, w - wh, h, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x + wh, y, w + wh, h, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x, y - wh, w, h - wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x, y + wh, w, h + wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, color2 )
end

addEventHandler("onClientRender", root,
	function ()
		local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "N/A"}
		local text = data[2]
		if data[1] then
			if data[2] == "closed" then
				text = "العاجل مغلق"
			else
				text = data[2]
			end
			if data[1] then
				dxDrawBorderedText("#1a75ffAdmin : #FFFFFF"..text, 33, 221, 205, 242, tocolor(255, 255, 255, 255), 1.0, "default-bold", "left", "top", true, false, true, true, true)
			end
		end
	end
)

-------#Server Side
local Groups = { "Console", "AL-3GeD" }
local Serials = {
	["سريالك"] = true,
	["سريالك2"] = true
}

function isPlayerAdmin(player)
    for k,v in ipairs ( Groups ) do
		if aclGetGroup(v) then
			if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) then
				return true
			end
		end
	end
end

addEventHandler("onResourceStart", resourceRoot,
	function()
		for _,player in ipairs(getElementsByType("player")) do
			if isPlayerAdmin(player) then
				bindKey(player, "u", "down", "chatbox", "IM")
			end
		end
	end
)


addCommandHandler("IM", 
	function(player,_,...)
		local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "N/A"}
		if not isGuestAccount(getPlayerAccount(player)) then
			if isPlayerAdmin(player) then
				if data[2] ~= "closed" then
					local message = table.concat({...}, " ")
					setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, message, (getElementData(player, "Name") or getPlayerName(player))})
				else
					outputChatBox("العاجل مغلق", player, 255, 0, 0, true)
				end
			end
		end
	end
)

addCommandHandler("switch",
	function(player)
		if Serials[getPlayerSerial(player)] then
			local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "N/A"}
			if data[2] ~= "closed" then
				setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, "closed", getPlayerName(player)})
				outputChatBox("تم اغلاق العاجل", player, 255, 0, 0, true)
			else
				setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, "", getPlayerName(player)})
				outputChatBox("تم فتح العاجل", player, 0, 255, 0, true)
			end
		end
	end
)

 

مشكوووووووووووور ي غاللي بس يا ريت تسعدني بمود ثاني وربي يخليك

Edited by HelpGuys
في مشكله بدي لما تقفل العاجل بضل الكلام لى كتبتها مثال انت كتبت حياكم الله وتقفل العاجل بضل حياكم الله فهمت حبيبي؟
Link to comment
On 1/8/2018 at 04:39, HelpGuys said:

بدي لما العاجل مبدي يطلع فالعاجل العاجل مغلق حاليا بدي يضل الكتابه لى انا مكتبتها والعاجل مقفل

--#Client Side
function dxDrawBorderedText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, color2 )
    local wh = 1
    local msg_gsub = text:gsub ( '#%x%x%x%x%x%x', '' )
    dxDrawText ( msg_gsub, x - wh, y - wh, w - wh, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black
    dxDrawText ( msg_gsub, x + wh, y - wh, w + wh, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x - wh, y + wh, w - wh, h + wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x + wh, y + wh, w + wh, h + wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x - wh, y, w - wh, h, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x + wh, y, w + wh, h, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x, y - wh, w, h - wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x, y + wh, w, h + wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, color2 )
end

addEventHandler("onClientRender", root,
	function ()
		local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "N/A"}
		local text = data[2]
		if data[1] then
			dxDrawBorderedText("#1a75ffAdmin : #FFFFFF"..text, 33, 221, 205, 242, tocolor(255, 255, 255, 255), 1.0, "default-bold", "left", "top", true, false, true, true, true)
		end
	end
)

 

Link to comment
19 hours ago, #x1AhMeD,-09 said:

--#Client Side
function dxDrawBorderedText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, color2 )
    local wh = 1
    local msg_gsub = text:gsub ( '#%x%x%x%x%x%x', '' )
    dxDrawText ( msg_gsub, x - wh, y - wh, w - wh, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black
    dxDrawText ( msg_gsub, x + wh, y - wh, w + wh, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x - wh, y + wh, w - wh, h + wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x + wh, y + wh, w + wh, h + wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x - wh, y, w - wh, h, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x + wh, y, w + wh, h, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x, y - wh, w, h - wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( msg_gsub, x, y + wh, w, h + wh, tocolor ( 0, 0, 0, 0  ), scale, font, alignX, alignY, clip, wordBreak, false )
    dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, color2 )
end

addEventHandler("onClientRender", root,
	function ()
		local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "N/A"}
		local text = data[2]
		if data[1] then
			dxDrawBorderedText("#1a75ffAdmin : #FFFFFF"..text, 33, 221, 205, 242, tocolor(255, 255, 255, 255), 1.0, "default-bold", "left", "top", true, false, true, true, true)
		end
	end
)

 

الووو

Link to comment
On 1/9/2018 at 01:37, HelpGuys said:

الووو

Quote

local Groups = { "Console", "AL-3GeD" }
local Serials = {
	["سريالك"] = true,
	["سريالك2"] = true
}
function isPlayerAdmin(player)
    for k,v in ipairs ( Groups ) do
		if aclGetGroup(v) then
			if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) then
				return true
			end
		end
	end
end
addEventHandler("onResourceStart", resourceRoot,
	function()
		for _,player in ipairs(getElementsByType("player")) do
			if isPlayerAdmin(player) then
				bindKey(player, "u", "down", "chatbox", "IM")
			end
		end
	end
)
addCommandHandler("IM", 
	function(player,_,...)
		local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "N/A"}
		if not isGuestAccount(getPlayerAccount(player)) then
			if isPlayerAdmin(player) then
				if data[2] ~= "closed" then
					local message = table.concat({...}, " ")
					setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, message, "opened"})
				else
					outputChatBox("العاجل مغلق", player, 255, 0, 0, true)
				end
			end
		end
	end
)
addCommandHandler("switch",
	function(player)
		if Serials[getPlayerSerial(player)] then
			local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "N/A"}
			if data[3] ~= "closed" then
				setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, data[2], "closed"})
				outputChatBox("تم اغلاق العاجل", player, 255, 0, 0, true)
			else
				setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, "", "opened"})
				outputChatBox("تم فتح العاجل", player, 0, 255, 0, true)
			end
		end
	end
)

 

 

Link to comment
  • 3 weeks later...
1 hour ago, HelpGuys said:

حد يعبرني

 local Groups = { "Console", "AL-3GeD" }
local Serials = {
	["سريالك"] = true,
	["سريالك2"] = true
}
function isPlayerAdmin(player)
    for k,v in ipairs ( Groups ) do
		if aclGetGroup(v) then
			if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) then
				return true
			end
		end
	end
end
addEventHandler("onResourceStart", resourceRoot,
	function()
		for _,player in ipairs(getElementsByType("player")) do
			if isPlayerAdmin(player) then
				bindKey(player, "u", "down", "chatbox", "IM")
			end
		end
	end
)
addCommandHandler("IM", 
	function(player,_,...)
		local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "opened"}
		if not isGuestAccount(getPlayerAccount(player)) then
			if isPlayerAdmin(player) then
				if data[2] ~= "closed" then
					local message = table.concat({...}, " ")
					setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, message, "opened"})
				else
					outputChatBox("العاجل مغلق", player, 255, 0, 0, true)
				end
			end
		end
	end
)

addCommandHandler("switch",
	function(player)
		if Serials[getPlayerSerial(player)] then
			local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "opened"}
			if data[3] ~= "closed" then
				setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, data[2], "closed"})
				outputChatBox("تم اغلاق العاجل", player, 255, 0, 0, true)
			else
				setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, data[2], "opened"})
				outputChatBox("تم فتح العاجل", player, 0, 255, 0, true)
			end
		end
	end
)

 

Link to comment

يـا اخوي شكرا على رد لكن لما ركبته صح بقي الكلام لى كتبته ولما قفلته العاجل بقدر اكتب فيه

اخوي الغالي لو عندك فيسبوك لو سمحت تعال صمم لى المود يرحم ولديك

Link to comment
19 hours ago, HelpGuys said:

يـا اخوي شكرا على رد لكن لما ركبته صح بقي الكلام لى كتبته ولما قفلته العاجل بقدر اكتب فيه

اخوي الغالي لو عندك فيسبوك لو سمحت تعال صمم لى المود يرحم ولديك

-_-

وش  يقولك الدي بق

 

 

Link to comment
On 1/9/2018 at 14:27, #x1AhMeD,-09 said:

 

وانا ابيك تعدلي قفل حبي 

AdminMessage-Server.lua


Groups = {  -- القروبات المسموح لها بالكتابة
"Console",
"AM",
} 

-------------------- لا داعي لتعديل الأكواد تحت هذا السطر -------------------

function check ( thePlayer, commandName, ... )
        local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
		local veve = { ... }
		local message = table.concat ( veve, " " )
        for i, v in ipairs ( Groups ) do
          if isObjectInACLGroup ( "user."..accName, aclGetGroup ( v ) ) then		
		setElementData ( resourceRoot, "MessageAdmin", message);
		setElementData(resourceRoot,"PlrAdmin",getPlayerName(thePlayer));
        SaveMessage (  )
		triggerClientEvent ( "Bingo", getRootElement(  ), getElementData ( resourceRoot, "MessageAdmin" ) )
		end
	end
end
addCommandHandler( "AM", check )

addEventHandler ( "onResourceStart", resourceRoot, function (  )
        executeSQLQuery("CREATE TABLE IF NOT EXISTS SaveMessagee (Message, Server)")
end
)

addEvent ( "SetMessage", true )
addEventHandler ( "SetMessage", root, function (  )
   getMessage (  )
end
)

SaveMessage = function (  )
local msg = executeSQLQuery ( "SELECT * FROM SaveMessagee WHERE Server = '" .. getServerName ( ) .."'" )
if ( #msg ~= 0  )   then
   return executeSQLQuery("UPDATE SaveMessagee SET Message=? WHERE Server=? ", tostring ( getElementData ( resourceRoot, "MessageAdmin"  ) ), getServerName ( ) )
else
   return executeSQLQuery("INSERT INTO SaveMessagee (Message,Server) VALUES(?,?)", tostring ( getElementData ( resourceRoot, "MessageAdmin" ) ), getServerName ( ) )
   end
end

getMessage = function (  )
local msg = executeSQLQuery ( "SELECT * FROM SaveMessagee" )
if ( #msg ~= 0  ) then
    setElementData ( resourceRoot, "MessageAdmin", msg[1]["Message"] )
    return setTimer ( triggerClientEvent, 1000, 1, "Bingo", getRootElement(  ), getElementData ( resourceRoot, "MessageAdmin" ) )
else
   return setTimer ( triggerClientEvent, 1000, 1, "Bingo", getRootElement(  ), " " )
  end
end 



AdminMessage-Client.lua

-- * Created By Bingo
local x,y = guiGetScreenSize();

addEvent ( "Bingo", true )
addEventHandler ( "Bingo", getRootElement(),function(message)
	txt = message;
end)

addEventHandler("onClientRender", getRootElement(  ),function(  )
	if ( txt ) then
		dxDrawText ( "#0044FFAdmin :", x*(13.0/800), y*(167.0/600), x*(55.0/800), y*(182.0/600), tocolor ( 255, 255, 0, 255 ), 1.0, "default-bold", "left", "top", false, false, false ,true)
		dxDrawText (txt, x*(60.0/800), y*(168.0/600), x*(799.0/800), y*(224.0/600), tocolor ( 255, 255, 255, 255 ), 1.0, "default-bold", "left", "top", false, false, false ,true)
	end
	if ( getElementData(resourceRoot,"PlrAdmin") ) then
		dxDrawText("#ffffff "..getElementData(resourceRoot,"PlrAdmin"),x*(13.0/800),y*(184.0/600),x*(799.0/800),y*(224.0/600),tocolor(255,255,255,255),0.85,"default-bold","left","top",false,false,false,true)
	end
end)
	
bindKey ( "i", "down", "chatbox", "AM" ) -- تغير الزر


addEventHandler ( "onClientResourceStart", resourceRoot, function (  )
triggerServerEvent ( "SetMessage", localPlayer )
end
)

 

Link to comment
42 minutes ago, mohsin said:

وانا ابيك تعدلي قفل حبي 

AdminMessage-Server.lua


Groups = {  -- القروبات المسموح لها بالكتابة"Console","AM",} -------------------- لا داعي لتعديل الأكواد تحت هذا السطر -------------------function check ( thePlayer, commandName, ... )        local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 		local veve = { ... }		local message = table.concat ( veve, " " )        for i, v in ipairs ( Groups ) do          if isObjectInACLGroup ( "user."..accName, aclGetGroup ( v ) ) then				setElementData ( resourceRoot, "MessageAdmin", message);		setElementData(resourceRoot,"PlrAdmin",getPlayerName(thePlayer));        SaveMessage (  )		triggerClientEvent ( "Bingo", getRootElement(  ), getElementData ( resourceRoot, "MessageAdmin" ) )		end	endendaddCommandHandler( "AM", check )addEventHandler ( "onResourceStart", resourceRoot, function (  )        executeSQLQuery("CREATE TABLE IF NOT EXISTS SaveMessagee (Message, Server)")end)addEvent ( "SetMessage", true )addEventHandler ( "SetMessage", root, function (  )   getMessage (  )end)SaveMessage = function (  )local msg = executeSQLQuery ( "SELECT * FROM SaveMessagee WHERE Server = '" .. getServerName ( ) .."'" )if ( #msg ~= 0  )   then   return executeSQLQuery("UPDATE SaveMessagee SET Message=? WHERE Server=? ", tostring ( getElementData ( resourceRoot, "MessageAdmin"  ) ), getServerName ( ) )else   return executeSQLQuery("INSERT INTO SaveMessagee (Message,Server) VALUES(?,?)", tostring ( getElementData ( resourceRoot, "MessageAdmin" ) ), getServerName ( ) )   endendgetMessage = function (  )local msg = executeSQLQuery ( "SELECT * FROM SaveMessagee" )if ( #msg ~= 0  ) then    setElementData ( resourceRoot, "MessageAdmin", msg[1]["Message"] )    return setTimer ( triggerClientEvent, 1000, 1, "Bingo", getRootElement(  ), getElementData ( resourceRoot, "MessageAdmin" ) )else   return setTimer ( triggerClientEvent, 1000, 1, "Bingo", getRootElement(  ), " " )  endend 

AdminMessage-Client.lua


-- * Created By Bingolocal x,y = guiGetScreenSize();addEvent ( "Bingo", true )addEventHandler ( "Bingo", getRootElement(),function(message)	txt = message;end)addEventHandler("onClientRender", getRootElement(  ),function(  )	if ( txt ) then		dxDrawText ( "#0044FFAdmin :", x*(13.0/800), y*(167.0/600), x*(55.0/800), y*(182.0/600), tocolor ( 255, 255, 0, 255 ), 1.0, "default-bold", "left", "top", false, false, false ,true)		dxDrawText (txt, x*(60.0/800), y*(168.0/600), x*(799.0/800), y*(224.0/600), tocolor ( 255, 255, 255, 255 ), 1.0, "default-bold", "left", "top", false, false, false ,true)	end	if ( getElementData(resourceRoot,"PlrAdmin") ) then		dxDrawText("#ffffff "..getElementData(resourceRoot,"PlrAdmin"),x*(13.0/800),y*(184.0/600),x*(799.0/800),y*(224.0/600),tocolor(255,255,255,255),0.85,"default-bold","left","top",false,false,false,true)	endend)	bindKey ( "i", "down", "chatbox", "AM" ) -- تغير الزرaddEventHandler ( "onClientResourceStart", resourceRoot, function (  )triggerServerEvent ( "SetMessage", localPlayer )end)

 

طيب يخوي وش اكتب في اف8 على شن الكتابة تبقى لى انا كتبتها واقفل العاجل على سبيل المثال انا كبست حرف ه وكتبت
Admin: شـكرا لك عـلى المسـاعده 
بروح اف8 واكتب على سبيل المثال )قفل
يطلع فشات : لقد قمة بقفل العاجل
بضل فالعاجل الكتابة هيك Admin: شـكرا لك عـلى المسـاعده 
ميتغير كأني مكتبت شيء ولا عملت ولما ارجع اكتب فالعاجل يقولي هيك
العاجل مغلق..
ولما ارجع اكتب في اف8 نفس الكلمة يطلع فشات : لقد قمة بفتح العاجل
وشكرااااا

 local Groups = { "Console", "AL-3GeD" }
local Serials = {
	["سريالك1"] = true,
	["سريالك2"] = true
}
function isPlayerAdmin(player)
    for k,v in ipairs ( Groups ) do
		if aclGetGroup(v) then
			if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) then
				return true
			end
		end
	end
end
addEventHandler("onResourceStart", resourceRoot,
	function()
		for _,player in ipairs(getElementsByType("player")) do
			if isPlayerAdmin(player) then
				bindKey(player, "u", "down", "chatbox", "IM")
			end
		end
	end
)
addCommandHandler("IM", 
	function(player,_,...)
		local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "opened"}
		if not isGuestAccount(getPlayerAccount(player)) then
			if isPlayerAdmin(player) then
				if data[2] ~= "closed" then
					local message = table.concat({...}, " ")
					setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, message, "opened"})
				else
					outputChatBox("العاجل مغلق", player, 255, 0, 0, true)
				end
			end
		end
	end
)
addCommandHandler("قفل",
	function(player)
		if Serials[getPlayerSerial(player)] then
			local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "opened"}
			if data[3] ~= "closed" then
				setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, data[2], "closed"})
				outputChatBox("تم اغلاق العاجل", player, 255, 0, 0, true)
			else
				setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, data[2], "opened"})
				outputChatBox("تم فتح العاجل", player, 0, 255, 0, true)
			end
		end
	end
)

زي كذا بس هاذي في مشكلة لما اكتب قفل يطلع لى فشات انو انقفل لكن اقدر اكتب فيه

Link to comment
On 1/29/2018 at 14:54, HelpGuys said:

طيب يخوي وش اكتب في اف8 على شن الكتابة تبقى لى انا كتبتها واقفل العاجل على سبيل المثال انا كبست حرف ه وكتبت
Admin: شـكرا لك عـلى المسـاعده 
بروح اف8 واكتب على سبيل المثال )قفل
يطلع فشات : لقد قمة بقفل العاجل
بضل فالعاجل الكتابة هيك Admin: شـكرا لك عـلى المسـاعده 
ميتغير كأني مكتبت شيء ولا عملت ولما ارجع اكتب فالعاجل يقولي هيك
العاجل مغلق..
ولما ارجع اكتب في اف8 نفس الكلمة يطلع فشات : لقد قمة بفتح العاجل
وشكرااااا


 local Groups = { "Console", "AL-3GeD" }
local Serials = {
	["سريالك1"] = true,
	["سريالك2"] = true
}
function isPlayerAdmin(player)
    for k,v in ipairs ( Groups ) do
		if aclGetGroup(v) then
			if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) then
				return true
			end
		end
	end
end
addEventHandler("onResourceStart", resourceRoot,
	function()
		for _,player in ipairs(getElementsByType("player")) do
			if isPlayerAdmin(player) then
				bindKey(player, "u", "down", "chatbox", "IM")
			end
		end
	end
)
addCommandHandler("IM", 
	function(player,_,...)
		local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "opened"}
		if not isGuestAccount(getPlayerAccount(player)) then
			if isPlayerAdmin(player) then
				if data[2] ~= "closed" then
					local message = table.concat({...}, " ")
					setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, message, "opened"})
				else
					outputChatBox("العاجل مغلق", player, 255, 0, 0, true)
				end
			end
		end
	end
)
addCommandHandler("قفل",
	function(player)
		if Serials[getPlayerSerial(player)] then
			local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "opened"}
			if data[3] ~= "closed" then
				setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, data[2], "closed"})
				outputChatBox("تم اغلاق العاجل", player, 255, 0, 0, true)
			else
				setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, data[2], "opened"})
				outputChatBox("تم فتح العاجل", player, 0, 255, 0, true)
			end
		end
	end
)

زي كذا بس هاذي في مشكلة لما اكتب قفل يطلع لى فشات انو انقفل لكن اقدر اكتب فيه

تقدر تكتب فيه لانك ضايف سريالك -_-

 

 

 

شي ينرفز

Link to comment
33 minutes ago, *RayaN-Alharbi. said:

اكتب في اف8

debugscrip 3

وشغل المود

وصور الشاشه وورني

 

33 minutes ago, *RayaN-Alharbi. said:

اكتب في اف8

debugscrip 3

وشغل المود

وصور الشاشه وورني

من تونس انت؟

Link to comment

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