Jump to content

حل لو سمحتم


Recommended Posts

السلام عليكم

الحين كنت مسوي لوحة تفتح لـ رتبة
عدلتها وخليتها لحساب صار لخبطة وفي اشياء ماتظهر ف الجريد ليست
الاكواد : قبل
 

function open ( player, command )
	if ( getPlayerAccount ( player ) ) and not isGuestAccount ( getPlayerAccount ( player ) ) then
		if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount ( player )),aclGetGroup ( "Console" )) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount ( player )),aclGetGroup ( "Admin" )) then
			triggerClientEvent ( player, "open", player )
		else
			outputChatBox ( "* LOGIN [ with Concole or Admin ] First", player )
		end
	end
end

الاكواد بعد :

addCommandHandler("manager",
function(player)
    local acc = getPlayerAccount ( player )
	if isGuestAccount ( acc ) then
		return
	end
	local name = getAccountName(acc)
	if name == "3" or name == "2" or name == "1" then
		triggerClientEvent (player, "open", player)
	outputChatBox ( "[Welcome Manager]", player )
	else
	outputChatBox ( "* لقد حاولت فتح لوحه ادارية تم تسجيل محاولتك", player )
	end
end)

 

Link to comment
Just now, #\_oskar_/# said:

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

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

4 minutes ago, Rakan# said:

الاكواد صحيحه مابها اي خطا .

الخطا بالكلنت حط اكواد الكلنت .

 

المفروض الخطا بلكود حق فتح الوحة صحيح؟؟ 
اهو الكود 
 

function setGUIvisible ()
	local GUIvisible = ( not guiGetVisible ( wnd ) )
	guiSetVisible ( wnd, GUIvisible )
	showCursor ( GUIvisible )
end

addEvent( "open", true )
addEventHandler ( "open", root, setGUIvisible )

 

Link to comment
Table = {
	Commands = { 
		WindowOpen = 'manager' -- أمر فتح اللوحة
	} , 
	Accounts = { -- أسماء حساباتك
		'1' ,
		'2' , 
		'3'
	} , 
	Settings = { 
		MaximWarning = 3 -- هنا لو حاول 3 محاولات يعطيه كيك
	}
}

addCommandHandler ( Table.Commands.WindowOpen ,
	function ( Player )
		local Account = getPlayerAccount ( Player )
		if ( isGuestAccount ( Account ) ) then
			return 
		end
		local Name = getAccountName ( Account )
		for _ , v in ipairs ( Table.Accounts ) do
			if ( Name == v ) then 
				triggerClientEvent ( Player , 'open' , Player )
			else
				local Warning = getElementData ( Player , 'WarningData' ) or 0
				if ( Warning == Table.Settings.MaximWarning ) then 
					return kickPlayer ( Player , 'إستخدام أمر خاص بالإدارة' )
				end 
				setElementData ( Player , 'WarningData' , Warning + 1 )
				outputChatBox ( '* [ '..Data..' | '..Table.Settings.MaximWarning..' ]لقد حاولت فتح لوحه ادارية تم تسجيل محاولتك' , Player )
			end
		end 
	end 
)

أخوي سويت لك تعديل بسيط :-)

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