Jump to content

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


Recommended Posts

  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

On 1/7/2018 at 14:27, HelpGuys said:

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

ردو ي مبرمجين

Command = {
	['IM']  	= true; 

} 
 

addCommandHandler("LockC", function( plr )
 local acc = getPlayerAccount( plr )
 local accName = getAccountName ( acc )
 if isGuestAccount(acc) then return end
 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then ---- الرتبة الي تقدر تقفل وتفك العاجل
 ( getElementData(plr, "ChatL") == false ) then
 setElementData(plr, "ChatL", true)
 outputChatBox("تم اغلاق العاجل",root,255,0,0,true) 
 else
 setElementData(plr, "ChatL", false)
 outputChatBox("تم فتح العاجل",root,255,0,0,true) 
 			end 
 else
 outputChatBox (":O You :!",plr,255,0,0,true)
 		end
 	end 
)
		

addEventHandler ( 'onPlayerCommand',getRootElement ( ),
		function ( cmd , msg , ... )
		 if ( getElementData(source, "ChatL") == true ) then
		    local msg = table.concat({...} , " ")
		if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then ----- الرتبة الي تقدر تتكلم بالعاجل حتى لو مقفل
		 else
		if Command [ cmd ] then
		cancelEvent (	);
  outputChatBox("العاجل مغلق",source,255,0,0,true) 

			end
		end
	end
end)

 

Edited by *RayaN-Alharbi.
Link to comment
8 hours ago, *RayaN-Alharbi. said:

Command = {
	['IM']  	= true; 

} 
 

addCommandHandler("LockC", function( plr )
 local acc = getPlayerAccount( plr )
 local accName = getAccountName ( acc )
 if isGuestAccount(acc) then return end
 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then ---- الرتبة الي تقدر تقفل وتفك العاجل
 ( getElementData(plr, "ChatL") == false ) then
 setElementData(plr, "ChatL", true)
 outputChatBox("تم اغلاق العاجل",root,255,0,0,true) 
 else
 setElementData(plr, "ChatL", false)
 outputChatBox("تم فتح العاجل",root,255,0,0,true) 
 			end 
 else
 outputChatBox (":O You :!",plr,255,0,0,true)
 		end
 	end 
)
		

addEventHandler ( 'onPlayerCommand',getRootElement ( ),
		function ( cmd , msg , ... )
		 if ( getElementData(source, "ChatL") == true ) then
		    local msg = table.concat({...} , " ")
		if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then ----- الرتبة الي تقدر تتكلم بالعاجل حتى لو مقفل
		 else
		if Command [ cmd ] then
		cancelEvent (	);
  outputChatBox("العاجل مغلق",source,255,0,0,true) 

			end
		end
	end
end)

 

شكرا اخوي على رد

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 ( "	Admin : #FFFFFF" .. getElementData ( resourceRoot, "Msg_" ).. "", 15, 240, 205, 242, tocolor(255, 255, 255, 255), 1.0,"default-bold", "left", "top", false, false, false, true, false )
        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

 

1 minute ago, 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 ( "	Admin : #FFFFFF" .. getElementData ( resourceRoot, "Msg_" ).. "", 15, 240, 205, 242, tocolor(255, 255, 255, 255), 1.0,"default-bold", "left", "top", false, false, false, true, false )
        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

 

هذا مااغيره فيه شيء حب

Link to comment
3 hours ago, 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 ( "	Admin : #FFFFFF" .. getElementData ( resourceRoot, "Msg_" ).. "", 15, 240, 205, 242, tocolor(255, 255, 255, 255), 1.0,"default-bold", "left", "top", false, false, false, true, false )
        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

 

هذا مااغيره فيه شيء حب

الكود اللي عطيتك هو حطه في ملف السيرفر ولاتعدل شي ع الكلانت

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

الكود اللي عطيتك هو حطه في ملف السيرفر ولاتعدل شي ع الكلانت

يب لما اكتب ميطلع شيء

--Server
Command = {
	['IM']  	= true; 

} 
 

addCommandHandler("LockC", function( plr )
 local acc = getPlayerAccount( plr )
 local accName = getAccountName ( acc )
 if isGuestAccount(acc) then return end
 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then ---- الرتبة الي تقدر تقفل وتفك العاجل
 ( getElementData(plr, "ChatL") == false ) then
 setElementData(plr, "ChatL", true)
 outputChatBox("تم اغلاق العاجل",root,255,0,0,true) 
 else
 setElementData(plr, "ChatL", false)
 outputChatBox("تم فتح العاجل",root,255,0,0,true) 
 			end 
 else
 outputChatBox (":O You :!",plr,255,0,0,true)
 		end
 	end 
)
		

addEventHandler ( 'onPlayerCommand',getRootElement ( ),
		function ( cmd , msg , ... )
		 if ( getElementData(source, "ChatL") == true ) then
		    local msg = table.concat({...} , " ")
		if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then ----- الرتبة الي تقدر تتكلم بالعاجل حتى لو مقفل
		 else
		if Command [ cmd ] then
		cancelEvent (	);
  outputChatBox("العاجل مغلق",source,255,0,0,true) 

			end
		end
	end
end)



--Client
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 ( "Admin : #FFFFFF" .. getElementData ( resourceRoot, "Msg_" ).. "", 15, 240, 205, 242, tocolor(255, 255, 255, 255), 1.0,"default-bold", "left", "top", false, false, false, true, false )
        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

--meta
<meta>
<script src="1.lua" type="client" cache="false"/>
<script src="2.lua" />
<script src="client.lua" type="client"/>
</meta>

شوف ي اخوي :(

Link to comment
11 hours ago, HelpGuys said:

يب لما اكتب ميطلع شيء


--Server
Command = {
	['IM']  	= true; 

} 
 

addCommandHandler("LockC", function( plr )
 local acc = getPlayerAccount( plr )
 local accName = getAccountName ( acc )
 if isGuestAccount(acc) then return end
 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then ---- الرتبة الي تقدر تقفل وتفك العاجل
 ( getElementData(plr, "ChatL") == false ) then
 setElementData(plr, "ChatL", true)
 outputChatBox("تم اغلاق العاجل",root,255,0,0,true) 
 else
 setElementData(plr, "ChatL", false)
 outputChatBox("تم فتح العاجل",root,255,0,0,true) 
 			end 
 else
 outputChatBox (":O You :!",plr,255,0,0,true)
 		end
 	end 
)
		

addEventHandler ( 'onPlayerCommand',getRootElement ( ),
		function ( cmd , msg , ... )
		 if ( getElementData(source, "ChatL") == true ) then
		    local msg = table.concat({...} , " ")
		if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then ----- الرتبة الي تقدر تتكلم بالعاجل حتى لو مقفل
		 else
		if Command [ cmd ] then
		cancelEvent (	);
  outputChatBox("العاجل مغلق",source,255,0,0,true) 

			end
		end
	end
end)



--Client
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 ( "Admin : #FFFFFF" .. getElementData ( resourceRoot, "Msg_" ).. "", 15, 240, 205, 242, tocolor(255, 255, 255, 255), 1.0,"default-bold", "left", "top", false, false, false, true, false )
        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

--meta
<meta>
<script src="1.lua" type="client" cache="false"/>
<script src="2.lua" />
<script src="client.lua" type="client"/>
</meta>

شوف ي اخوي :(

اكتب في اف8 LockC عشان تفتح وتقفل العاجل

+ ليه ملف الميتا هنا؟

Edited by *RayaN-Alharbi.
Link to comment
3 hours ago, *RayaN-Alharbi. said:

المود تخبيص في تخبيص <>

هات العاجل حقك

عن نفسي م استعمل عاجل ولا احبه لانه يجيب لاق غالبا . وليس كل عاجل يجيب لاق 

لكن اللي كان معي سبب لآق وحذفته . لاق فبس طبعا

Link to comment
 
addCommandHandler("قفل", function( plr )
 local acc = getPlayerAccount( plr )
 local accName = getAccountName ( acc )
 if isGuestAccount(acc) then return end
 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then ---- الرتبة الي تقدر تقفل وتفك العاجل
 if ( getElementData(plr, "ChatL") == true ) then
 setElementData(plr, "ChatL", false)
 outputChatBox("تم اغلاق العاجل",root,255,0,0,true) 
 else
 setElementData(plr, "ChatL", true)
 outputChatBox("تم فتح العاجل",root,255,0,0,true) 
 			end 
 else
 outputChatBox (":O You :!",plr,255,0,0,true)
 		end
 	end 
)
		
addCommandHandler("IM",
		function ( source,_,...)
		 if ( getElementData(source, "ChatL") == true ) then
		    local msg = table.concat({...} , " ")
			
		if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then ----- الرتبة الي تقدر تتكلم بالعاجل حتى لو مقفل
		setElementData(resourceRoot,"Msg_",msg)
		setElementData(resourceRoot,"Have_",true)
		setElementData(resourceRoot,"By_",getPlayerName(source))
		 else
  outputChatBox("لاتملك الصلاحية للكتابة هنا",source,255,0,0,true) 
		end
		else
		outputChatBox("مغلق",source,255,0,0,true)
		end
end)
--Client

بس ياريت تخليها كمان على رتبة Msg

Link to comment
22 hours ago, HelpGuys said:

 addCommandHandler("قفل", function( plr ) local acc = getPlayerAccount( plr ) local accName = getAccountName ( acc ) if isGuestAccount(acc) then return end if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then ---- الرتبة الي تقدر تقفل وتفك العاجل if ( getElementData(plr, "ChatL") == true ) then setElementData(plr, "ChatL", false) outputChatBox("تم اغلاق العاجل",root,255,0,0,true)  else setElementData(plr, "ChatL", true) outputChatBox("تم فتح العاجل",root,255,0,0,true)  			end  else outputChatBox (":O You :!",plr,255,0,0,true) 		end 	end )		addCommandHandler("IM",		function ( source,_,...)		 if ( getElementData(source, "ChatL") == true ) then		    local msg = table.concat({...} , " ")					if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then ----- الرتبة الي تقدر تتكلم بالعاجل حتى لو مقفل		setElementData(resourceRoot,"Msg_",msg)		setElementData(resourceRoot,"Have_",true)		setElementData(resourceRoot,"By_",getPlayerName(source))		 else  outputChatBox("لاتملك الصلاحية للكتابة هنا",source,255,0,0,true) 		end		else		outputChatBox("مغلق",source,255,0,0,true)		endend)--Client

بس ياريت تخليها كمان على رتبة Msg

 
addCommandHandler("قفل", function( plr )
 local acc = getPlayerAccount( plr )
 local accName = getAccountName ( acc )
 if isGuestAccount(acc) then return end
 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) 
 or isObjectInACLGroup ("user."..accName, aclGetGroup ( "Msg" ) ) 
 then ---- الرتبة الي تقدر تقفل وتفك العاجل
 if ( getElementData(plr, "ChatL") == true ) then
 setElementData(plr, "ChatL", false)
 outputChatBox("تم اغلاق العاجل",root,255,0,0,true) 
 else
 setElementData(plr, "ChatL", true)
 outputChatBox("تم فتح العاجل",root,255,0,0,true) 
 			end 
 else
 outputChatBox (":O You :!",plr,255,0,0,true)
 		end
 	end 
)
		
addCommandHandler("IM",
		function ( source,_,...)
		 if ( getElementData(source, "ChatL") == true ) then
		    local msg = table.concat({...} , " ")
			
		 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) 
 or isObjectInACLGroup ("user."..accName, aclGetGroup ( "Msg" ) ) 
 then ---- الرتبة الي تقدر تتكلم بالعاجل حتى لو مقفل
		setElementData(resourceRoot,"Msg_",msg)
		setElementData(resourceRoot,"Have_",true)
		setElementData(resourceRoot,"By_",getPlayerName(source))
		 else
  outputChatBox("لاتملك الصلاحية للكتابة هنا",source,255,0,0,true) 
		end
		else
		outputChatBox("مغلق",source,255,0,0,true)
		end
end)
--Client

تفضل

Link to comment
47 minutes ago, Rakan# said:

 addCommandHandler("قفل", function( plr ) local acc = getPlayerAccount( plr ) local accName = getAccountName ( acc ) if isGuestAccount(acc) then return end if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) )  or isObjectInACLGroup ("user."..accName, aclGetGroup ( "Msg" ) )  then ---- الرتبة الي تقدر تقفل وتفك العاجل if ( getElementData(plr, "ChatL") == true ) then setElementData(plr, "ChatL", false) outputChatBox("تم اغلاق العاجل",root,255,0,0,true)  else setElementData(plr, "ChatL", true) outputChatBox("تم فتح العاجل",root,255,0,0,true)  			end  else outputChatBox (":O You :!",plr,255,0,0,true) 		end 	end )		addCommandHandler("IM",		function ( source,_,...)		 if ( getElementData(source, "ChatL") == true ) then		    local msg = table.concat({...} , " ")					 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) )  or isObjectInACLGroup ("user."..accName, aclGetGroup ( "Msg" ) )  then ---- الرتبة الي تقدر تتكلم بالعاجل حتى لو مقفل		setElementData(resourceRoot,"Msg_",msg)		setElementData(resourceRoot,"Have_",true)		setElementData(resourceRoot,"By_",getPlayerName(source))		 else  outputChatBox("لاتملك الصلاحية للكتابة هنا",source,255,0,0,true) 		end		else		outputChatBox("مغلق",source,255,0,0,true)		endend)--Client

تفضل

صرت معاد اقدر اكتب لما اكتب شيء ميطلع فعاجل

Edited by HelpGuys
Link to comment

معليش خطا بسيط خذ ذا

 
addCommandHandler("قفل", function( plr )
 local acc = getPlayerAccount( plr )
 local accName = getAccountName ( acc )
 if isGuestAccount(acc) then return end
 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) 
 or isObjectInACLGroup ("user."..accName, aclGetGroup ( "Msg" ) ) 
 then ---- الرتبة الي تقدر تقفل وتفك العاجل
 if ( getElementData(plr, "ChatL") == true ) then
 setElementData(plr, "ChatL", false)
 outputChatBox("تم اغلاق العاجل",root,255,0,0,true) 
 else
 setElementData(plr, "ChatL", true)
 outputChatBox("تم فتح العاجل",root,255,0,0,true) 
 			end 
 else
 outputChatBox (":O You :!",plr,255,0,0,true)
 		end
 	end 
)
		
addCommandHandler("IM",
		function ( source,_,...)
		 if ( getElementData(source, "ChatL") == true ) then
		    local msg = table.concat({...} , " ")
			
 if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "Console" ) ) 
 or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "Msg" ) ) 
 then ---- الرتبة الي تقدر تتكلم بالعاجل حتى لو مقفل
		setElementData(resourceRoot,"Msg_",msg)
		setElementData(resourceRoot,"Have_",true)
		setElementData(resourceRoot,"By_",getPlayerName(source))
		 else
  outputChatBox("لاتملك الصلاحية للكتابة هنا",source,255,0,0,true) 
		end
		else
		outputChatBox("مغلق",source,255,0,0,true)
		end
end)
--Client

 

Link to comment
1 minute ago, Rakan# said:

معليش خطا بسيط خذ ذا


 
addCommandHandler("قفل", function( plr )
 local acc = getPlayerAccount( plr )
 local accName = getAccountName ( acc )
 if isGuestAccount(acc) then return end
 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) 
 or isObjectInACLGroup ("user."..accName, aclGetGroup ( "Msg" ) ) 
 then ---- الرتبة الي تقدر تقفل وتفك العاجل
 if ( getElementData(plr, "ChatL") == true ) then
 setElementData(plr, "ChatL", false)
 outputChatBox("تم اغلاق العاجل",root,255,0,0,true) 
 else
 setElementData(plr, "ChatL", true)
 outputChatBox("تم فتح العاجل",root,255,0,0,true) 
 			end 
 else
 outputChatBox (":O You :!",plr,255,0,0,true)
 		end
 	end 
)
		
addCommandHandler("IM",
		function ( source,_,...)
		 if ( getElementData(source, "ChatL") == true ) then
		    local msg = table.concat({...} , " ")
			
 if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "Console" ) ) 
 or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "Msg" ) ) 
 then ---- الرتبة الي تقدر تتكلم بالعاجل حتى لو مقفل
		setElementData(resourceRoot,"Msg_",msg)
		setElementData(resourceRoot,"Have_",true)
		setElementData(resourceRoot,"By_",getPlayerName(source))
		 else
  outputChatBox("لاتملك الصلاحية للكتابة هنا",source,255,0,0,true) 
		end
		else
		outputChatBox("مغلق",source,255,0,0,true)
		end
end)
--Client

 

حب المشكلة انا الكنسول يقدر يكتب ولى رتبة Msg
ميقدرون

Link to comment
3 minutes ago, Rakan# said:

طيب سويت لك ؟

يب مزبط

ارجو الحل اخوي فقط الكنسول يقدر يكتب بالعاجل

تمام حبي زبط زبط تسلم

ي حب :(

بدي فقط رتبة الكنسول تقدر تكتب بالعاجل لما مقفل ولما ينفتح العاجل رتبة msg
تصير تكتب 

تقدر تكتب Msgمبدي رتبة تقدر تتكلم بالعاجل بدي فقط لما تقل العاجل ولا حد يقدر يكتب ولما ينفتح العاجل بدي رتبة 

يرحم امك رد

Link to comment
 
addCommandHandler("قفل", function( plr )
 local acc = getPlayerAccount( plr )
 local accName = getAccountName ( acc )
 if isGuestAccount(acc) then return end
 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) ---- الرتبة الي تقدر تقفل وتفك العاجل
 then 
 if ( getElementData(plr, "ChatL") == true ) then
 setElementData(plr, "ChatL", false)
 outputChatBox("تم اغلاق العاجل",root,255,0,0,true) 
 else
 setElementData(plr, "ChatL", true)
 outputChatBox("تم فتح العاجل",root,255,0,0,true) 
 			end 
 else
 outputChatBox ("You ! :o",plr,255,255,255,true)
 		end
 	end 
)
		
addCommandHandler("IM",
		function ( source,_,...)
		 if ( getElementData(source, "ChatL") == true ) then
		    local msg = table.concat({...} , " ")
			
 if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "Console" ) ) ---- الرتبة الي تقدر تتكلم بالعاجل حتى لو مقفل
 then 
		setElementData(resourceRoot,"Msg_",msg)
		setElementData(resourceRoot,"Have_",true)
		setElementData(resourceRoot,"By_",getPlayerName(source))
		 else
		end
		else
		outputChatBox("مغلق",source,255,0,0,true)
		end
end)

addCommandHandler("IM",
		function ( source,_,...)
		 if ( getElementData(source, "ChatL") == true ) then
		    local msg = table.concat({...} , " ")
			
 if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "Msg" ) ) ---- الرتبة لى متقدر تتكلم فالعاجل بعد إغلاقه
 then 
		setElementData(resourceRoot,"Msg_",msg)
		setElementData(resourceRoot,"Have_",true)
		setElementData(resourceRoot,"By_",getPlayerName(source))
		 else
		end
		else
		outputChatBox("مغلق",source,255,0,0,true)
		end
end)
--Client

عدل لى اخر واحد

Link to comment
 
addCommandHandler("قفل", function( plr )
 local acc = getPlayerAccount( plr )
 local accName = getAccountName ( acc )
 if isGuestAccount(acc) then return end
 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) ---- الرتبة الي تقدر تقفل وتفك العاجل
 then 
 if ( getElementData(plr, "ChatL") == true ) then
 setElementData(plr, "ChatL", false)
 outputChatBox("تم اغلاق العاجل",root,255,0,0,true) 
 else
 setElementData(plr, "ChatL", true)
 outputChatBox("تم فتح العاجل",root,255,0,0,true) 
 			end 
 else
 outputChatBox ("You ! :o",plr,255,255,255,true)
 		end
 	end 
)
		
addCommandHandler("IM",
		function ( source,_,...)
		 if ( getElementData(source, "ChatL") == true ) then
		    local msg = table.concat({...} , " ")
			
 if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "Console" ) ) ---- الرتبة الي تقدر تتكلم بالعاجل حتى لو مقفل
 then 
		setElementData(resourceRoot,"Msg_",msg)
		setElementData(resourceRoot,"Have_",true)
		setElementData(resourceRoot,"By_",getPlayerName(source))
		 else
		end
		else
		outputChatBox("مغلق",source,255,0,0,true)
		end
end)
addCommandHandler("IM",
		function ( source,_,...)
		 if ( getElementData(source, "ChatL") == true ) then
		    local msg = table.concat({...} , " ")
			
 if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "Msg" ) ) ---- الرتبة لى متقدر تتكلم فالعاجل بعد إغلاقه
 then 
		setElementData(resourceRoot,"Msg_",msg)
		setElementData(resourceRoot,"Have_",true)
		setElementData(resourceRoot,"By_",getPlayerName(source))
		 else
		end
		else
		outputChatBox("مغلق",source,255,0,0,true)
		end
end)
--Client

زبطلي اخر فكنشت انا سويتها هيك عشن احد يسعدني فيها

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