Jump to content

trigger ._.


Recommended Posts

السلام عليكم

والله جربت اكثر من 20 محاولة و ما نجحت يمكن أنا مش فاهم الترايقر 

function openOrCloseGUI ()
	if guiGetVisible (mainWindow) then
		guiSetVisible (mainWindow, false)
		guiSetVisible (linkWindow, false)
		showCursor (false)
	else
		guiSetVisible (mainWindow, true)
		showCursor (true)
	end
end
addEvent("speakeronlystaffs",true)
addEventHandler("speakeronlystaffs",resourceRoot,openOrCloseGUI)
addCommandHandler ("speaker", openOrCloseGUI)
bindKey (openKey, "down", openOrCloseGUI)
function staffsonlyy(player)
				local accname = getAccountName (getPlayerAccount(player))
				if isObjectInACLGroup ("user." .. accname, aclGetGroup("Admin")) then
			triggerClientEvent(player,"speakeronlystaffs", getRootElement())
				end
			end

بدي اللوحة للأدمنية بس

Link to comment
-- # Server
function staffsonlyy ( player )
	local accname = getAccountName ( getPlayerAccount ( player ) )
	if ( isObjectInACLGroup ( "user." .. ( accname ) , aclGetGroup ( "Admin" ) ) ) then
		triggerClientEvent ( player , "speakeronlystaffs" , player )
	end
end

-- # Client
function openOrCloseGUI ( )
	if ( guiGetVisible ( mainWindow ) ) then
		guiSetVisible ( mainWindow , false )
		guiSetVisible ( linkWindow , false )
		showCursor ( false )
	else
		guiSetVisible ( mainWindow , true )
		showCursor ( true )
	end
end

addEvent ( "speakeronlystaffs" , true )
addEventHandler ( "speakeronlystaffs" , root , openOrCloseGUI )
addCommandHandler ( "speaker" , openOrCloseGUI )
bindKey ( openKey , "down" , openOrCloseGUI )

 

  • Like 1
Link to comment
On 01/08/2019 at 07:58, MrBiG said:

-- # Server
function staffsonlyy ( player )
	local accname = getAccountName ( getPlayerAccount ( player ) )
	if ( isObjectInACLGroup ( "user." .. ( accname ) , aclGetGroup ( "Admin" ) ) ) then
		triggerClientEvent ( player , "speakeronlystaffs" , player )
	end
end

-- # Client
function openOrCloseGUI ( )
	if ( guiGetVisible ( mainWindow ) ) then
		guiSetVisible ( mainWindow , false )
		guiSetVisible ( linkWindow , false )
		showCursor ( false )
	else
		guiSetVisible ( mainWindow , true )
		showCursor ( true )
	end
end

addEvent ( "speakeronlystaffs" , true )
addEventHandler ( "speakeronlystaffs" , root , openOrCloseGUI )
addCommandHandler ( "speaker" , openOrCloseGUI )
bindKey ( openKey , "down" , openOrCloseGUI )

 

طيب ما ارسلت تريقر للسيرفر عشان تشوف اذا ادمن ولا لا

Link to comment
--server--
addEvent("check",true)
addEventHandler("check",root,
function()
	local accname = getAccountName ( getPlayerAccount ( source ) )
	if ( isObjectInACLGroup ( "user." .. ( accname ) , aclGetGroup ( "Admin" ) ) ) then
		triggerClientEvent ( source , "speakeronlystaffs" , source )
	end
end
)
--client--
mainWindow = guiCreateWindow(565, 214, 307, 481, "Your Panel", false)
		guiSetVisible ( mainWindow , false )
addEvent ( "speakeronlystaffs" , true )
addEventHandler ( "speakeronlystaffs" , root ,
function ( )
	if ( guiGetVisible ( mainWindow ) == false) then
		guiSetVisible ( mainWindow , true )
		showCursor ( true )
	else
		guiSetVisible ( mainWindow , false )
		showCursor ( false )
	end
end
)

function openOrCloseGUI()
    triggerServerEvent("check",localPlayer)
end
addCommandHandler ( "speaker" , openOrCloseGUI )
bindKey ( "k" , "down" , openOrCloseGUI )

 

Link to comment
On 02/08/2019 at 15:08, N3xT said:

طيب ما ارسلت تريقر للسيرفر عشان تشوف اذا ادمن ولا لا

هو ارسل كود وانا زبطته 

لاسيما انو انا ما بعرف وين بدو يسوي التريقر

وممكن بستخدم التريقر بغير كود

 

Edited by MrBiG
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...