Jump to content

Recommended Posts

Posted

                                                                                    سلام عليكم ورحة الله وبركاته

 

كيفكم يخوان عساكم بخير

انا سويت مود لوحة تحكم يعني تفتح من اف5 وسويت فيها 3 زرار يفتحو لوحات اول زر فتح لوحة الصوات انا افتحها تفتح وتسكر لوحة التحكم بس المشكلة حين ارجع اضغط اف 5 تم فاتحة لوحة الصوات 

الرجاء تحلو مشكلتي:$

  • Like 1
Posted (edited)
Spoiler

    local key = "F5"
GUIEditor = {
    label = {},
}
window1 = guiCreateWindow(271, 156, 513, 438, "..::[لوحة تحكم سيرفر أسود العرب]::..", false)
guiWindowSetSizable(window1, false)
guiSetAlpha(window1, 0.90)
guiSetProperty(window1, "CaptionColour", "FF12FF00")

button1 = guiCreateButton(31, 65, 189, 40, "الصوت", false, window1)
guiSetProperty(button1, "NormalTextColour", "FF00AF00")
button6 = guiCreateButton(295, 65, 189, 40, "شراء الرتب", false, window1)
guiSetProperty(button6, "NormalTextColour", "FF00AF00")
button7 = guiCreateButton(295, 135, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button7, "NormalTextColour", "FFAF0000")
button2 = guiCreateButton(31, 137, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button2, "NormalTextColour", "FFAF0000")
button3 = guiCreateButton(31, 203, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button3, "NormalTextColour", "FFAF0000")
button8 = guiCreateButton(295, 203, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button8, "NormalTextColour", "FFAF0000")
button4 = guiCreateButton(31, 269, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button4, "NormalTextColour", "FFAF0000")
button9 = guiCreateButton(295, 269, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button9, "NormalTextColour", "FFAF0000")
button5 = guiCreateButton(31, 331, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button5, "NormalTextColour", "FFAF0000")
button10 = guiCreateButton(295, 331, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button10, "NormalTextColour", "FFAF0000")
GUIEditor.label[1] = guiCreateLabel(10, 413, 134, 15, "by : MR_Mahmoud_M.H", false, window1)
guiLabelSetColor(GUIEditor.label[1], 0, 175, 0)
GUIEditor.label[2] = guiCreateLabel(243, 65, 35, 38, "*", false, window1)
guiSetFont(GUIEditor.label[2], "sa-gothic")
guiLabelSetColor(GUIEditor.label[2], 255, 0, 0)
GUIEditor.label[3] = guiCreateLabel(243, 137, 40, 39, "*", false, window1)
guiSetFont(GUIEditor.label[3], "sa-gothic")
guiLabelSetColor(GUIEditor.label[3], 0, 255, 36)
GUIEditor.label[4] = guiCreateLabel(243, 203, 38, 41, "*", false, window1)
guiSetFont(GUIEditor.label[4], "sa-gothic")
guiLabelSetColor(GUIEditor.label[4], 255, 0, 0)
GUIEditor.label[5] = guiCreateLabel(243, 269, 38, 41, "*", false, window1)
guiSetFont(GUIEditor.label[5], "sa-gothic")
guiLabelSetColor(GUIEditor.label[5], 0, 255, 36)
GUIEditor.label[6] = guiCreateLabel(243, 331, 38, 41, "*", false, window1)
guiSetFont(GUIEditor.label[6], "sa-gothic")
guiLabelSetColor(GUIEditor.label[6], 255, 0, 0)
AKLAK = guiCreateButton(203, 400, 123, 29, "اغلاق الوحة", false, window1)
guiSetProperty(AKLAK, "NormalTextColour", "FFFD0000")
GUIEditor.label[7] = guiCreateLabel(391, 383, 77, 45, "M.H", false, window1)
guiSetFont(GUIEditor.label[7], "sa-header")
guiLabelSetColor(GUIEditor.label[7], 175, 0, 0)
   guiSetVisible (window1, false)
bindKey( key, "down",function()
guiSetVisible (window1, not guiGetVisible (window1) )
showCursor ( guiGetVisible (window1) )
end)

-------------زر اغلاق الوحة+زر 1 الصوات من مود الراديو

addEventHandler('onClientGUIClick',root,
function()
if source == AKLAK then
guiSetVisible(window1,false) showCursor(false)
elseif source==button1 then
triggerEvent('openspwnd',localPlayer)
elseif source==button6 then
triggerEvent('rtb',localPlayer)

guiSetVisible(window1,false)---------------أغلاق لوحة 1 عند فتح لوحة 2
end
end
)

 

    local key = "F5"
GUIEditor = {
    label = {},
}
window1 = guiCreateWindow(271, 156, 513, 438, "..::[لوحة تحكم سيرفر أسود العرب]::..", false)
guiWindowSetSizable(window1, false)
guiSetAlpha(window1, 0.90)
guiSetProperty(window1, "CaptionColour", "FF12FF00")

button1 = guiCreateButton(31, 65, 189, 40, "الصوت", false, window1)
guiSetProperty(button1, "NormalTextColour", "FF00AF00")
button6 = guiCreateButton(295, 65, 189, 40, "شراء الرتب", false, window1)
guiSetProperty(button6, "NormalTextColour", "FF00AF00")
button7 = guiCreateButton(295, 135, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button7, "NormalTextColour", "FFAF0000")
button2 = guiCreateButton(31, 137, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button2, "NormalTextColour", "FFAF0000")
button3 = guiCreateButton(31, 203, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button3, "NormalTextColour", "FFAF0000")
button8 = guiCreateButton(295, 203, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button8, "NormalTextColour", "FFAF0000")
button4 = guiCreateButton(31, 269, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button4, "NormalTextColour", "FFAF0000")
button9 = guiCreateButton(295, 269, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button9, "NormalTextColour", "FFAF0000")
button5 = guiCreateButton(31, 331, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button5, "NormalTextColour", "FFAF0000")
button10 = guiCreateButton(295, 331, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button10, "NormalTextColour", "FFAF0000")
GUIEditor.label[1] = guiCreateLabel(10, 413, 134, 15, "by : MR_Mahmoud_M.H", false, window1)
guiLabelSetColor(GUIEditor.label[1], 0, 175, 0)
GUIEditor.label[2] = guiCreateLabel(243, 65, 35, 38, "*", false, window1)
guiSetFont(GUIEditor.label[2], "sa-gothic")
guiLabelSetColor(GUIEditor.label[2], 255, 0, 0)
GUIEditor.label[3] = guiCreateLabel(243, 137, 40, 39, "*", false, window1)
guiSetFont(GUIEditor.label[3], "sa-gothic")
guiLabelSetColor(GUIEditor.label[3], 0, 255, 36)
GUIEditor.label[4] = guiCreateLabel(243, 203, 38, 41, "*", false, window1)
guiSetFont(GUIEditor.label[4], "sa-gothic")
guiLabelSetColor(GUIEditor.label[4], 255, 0, 0)
GUIEditor.label[5] = guiCreateLabel(243, 269, 38, 41, "*", false, window1)
guiSetFont(GUIEditor.label[5], "sa-gothic")
guiLabelSetColor(GUIEditor.label[5], 0, 255, 36)
GUIEditor.label[6] = guiCreateLabel(243, 331, 38, 41, "*", false, window1)
guiSetFont(GUIEditor.label[6], "sa-gothic")
guiLabelSetColor(GUIEditor.label[6], 255, 0, 0)
AKLAK = guiCreateButton(203, 400, 123, 29, "اغلاق الوحة", false, window1)
guiSetProperty(AKLAK, "NormalTextColour", "FFFD0000")
GUIEditor.label[7] = guiCreateLabel(391, 383, 77, 45, "M.H", false, window1)
guiSetFont(GUIEditor.label[7], "sa-header")
guiLabelSetColor(GUIEditor.label[7], 175, 0, 0)
   guiSetVisible (window1, false)
bindKey( key, "down",function()
guiSetVisible (window1, not guiGetVisible (window1) )
showCursor ( guiGetVisible (window1) )
end)

-------------زر اغلاق الوحة+زر 1 الصوات من مود الراديو

addEventHandler('onClientGUIClick',root,
function()
if source == AKLAK then
guiSetVisible(window1,false) showCursor(false)
elseif source==button1 then
triggerEvent('openspwnd',localPlayer)
elseif source==button6 then
triggerEvent('rtb',localPlayer)

guiSetVisible(window1,false)---------------أغلاق لوحة 1 عند فتح لوحة 2
end
end
)

Edited by MR_Mahmoud
Posted
11 hours ago, #_iMr.[E]coo said:

triggerEvent ×

الصحيح هو

triggerServerEvent

ركز الله يهديك وش جالس تقول انت

11 hours ago, MR_Mahmoud said:
  Reveal hidden contents

    local key = "F5"
GUIEditor = {
    label = {},
}
window1 = guiCreateWindow(271, 156, 513, 438, "..::[لوحة تحكم سيرفر أسود العرب]::..", false)
guiWindowSetSizable(window1, false)
guiSetAlpha(window1, 0.90)
guiSetProperty(window1, "CaptionColour", "FF12FF00")

button1 = guiCreateButton(31, 65, 189, 40, "الصوت", false, window1)
guiSetProperty(button1, "NormalTextColour", "FF00AF00")
button6 = guiCreateButton(295, 65, 189, 40, "شراء الرتب", false, window1)
guiSetProperty(button6, "NormalTextColour", "FF00AF00")
button7 = guiCreateButton(295, 135, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button7, "NormalTextColour", "FFAF0000")
button2 = guiCreateButton(31, 137, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button2, "NormalTextColour", "FFAF0000")
button3 = guiCreateButton(31, 203, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button3, "NormalTextColour", "FFAF0000")
button8 = guiCreateButton(295, 203, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button8, "NormalTextColour", "FFAF0000")
button4 = guiCreateButton(31, 269, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button4, "NormalTextColour", "FFAF0000")
button9 = guiCreateButton(295, 269, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button9, "NormalTextColour", "FFAF0000")
button5 = guiCreateButton(31, 331, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button5, "NormalTextColour", "FFAF0000")
button10 = guiCreateButton(295, 331, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button10, "NormalTextColour", "FFAF0000")
GUIEditor.label[1] = guiCreateLabel(10, 413, 134, 15, "by : MR_Mahmoud_M.H", false, window1)
guiLabelSetColor(GUIEditor.label[1], 0, 175, 0)
GUIEditor.label[2] = guiCreateLabel(243, 65, 35, 38, "*", false, window1)
guiSetFont(GUIEditor.label[2], "sa-gothic")
guiLabelSetColor(GUIEditor.label[2], 255, 0, 0)
GUIEditor.label[3] = guiCreateLabel(243, 137, 40, 39, "*", false, window1)
guiSetFont(GUIEditor.label[3], "sa-gothic")
guiLabelSetColor(GUIEditor.label[3], 0, 255, 36)
GUIEditor.label[4] = guiCreateLabel(243, 203, 38, 41, "*", false, window1)
guiSetFont(GUIEditor.label[4], "sa-gothic")
guiLabelSetColor(GUIEditor.label[4], 255, 0, 0)
GUIEditor.label[5] = guiCreateLabel(243, 269, 38, 41, "*", false, window1)
guiSetFont(GUIEditor.label[5], "sa-gothic")
guiLabelSetColor(GUIEditor.label[5], 0, 255, 36)
GUIEditor.label[6] = guiCreateLabel(243, 331, 38, 41, "*", false, window1)
guiSetFont(GUIEditor.label[6], "sa-gothic")
guiLabelSetColor(GUIEditor.label[6], 255, 0, 0)
AKLAK = guiCreateButton(203, 400, 123, 29, "اغلاق الوحة", false, window1)
guiSetProperty(AKLAK, "NormalTextColour", "FFFD0000")
GUIEditor.label[7] = guiCreateLabel(391, 383, 77, 45, "M.H", false, window1)
guiSetFont(GUIEditor.label[7], "sa-header")
guiLabelSetColor(GUIEditor.label[7], 175, 0, 0)
   guiSetVisible (window1, false)
bindKey( key, "down",function()
guiSetVisible (window1, not guiGetVisible (window1) )
showCursor ( guiGetVisible (window1) )
end)

-------------زر اغلاق الوحة+زر 1 الصوات من مود الراديو

addEventHandler('onClientGUIClick',root,
function()
if source == AKLAK then
guiSetVisible(window1,false) showCursor(false)
elseif source==button1 then
triggerEvent('openspwnd',localPlayer)
elseif source==button6 then
triggerEvent('rtb',localPlayer)

guiSetVisible(window1,false)---------------أغلاق لوحة 1 عند فتح لوحة 2
end
end
)

 

    local key = "F5"
GUIEditor = {
    label = {},
}
window1 = guiCreateWindow(271, 156, 513, 438, "..::[لوحة تحكم سيرفر أسود العرب]::..", false)
guiWindowSetSizable(window1, false)
guiSetAlpha(window1, 0.90)
guiSetProperty(window1, "CaptionColour", "FF12FF00")

button1 = guiCreateButton(31, 65, 189, 40, "الصوت", false, window1)
guiSetProperty(button1, "NormalTextColour", "FF00AF00")
button6 = guiCreateButton(295, 65, 189, 40, "شراء الرتب", false, window1)
guiSetProperty(button6, "NormalTextColour", "FF00AF00")
button7 = guiCreateButton(295, 135, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button7, "NormalTextColour", "FFAF0000")
button2 = guiCreateButton(31, 137, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button2, "NormalTextColour", "FFAF0000")
button3 = guiCreateButton(31, 203, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button3, "NormalTextColour", "FFAF0000")
button8 = guiCreateButton(295, 203, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button8, "NormalTextColour", "FFAF0000")
button4 = guiCreateButton(31, 269, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button4, "NormalTextColour", "FFAF0000")
button9 = guiCreateButton(295, 269, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button9, "NormalTextColour", "FFAF0000")
button5 = guiCreateButton(31, 331, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button5, "NormalTextColour", "FFAF0000")
button10 = guiCreateButton(295, 331, 189, 40, "قريبأ...#", false, window1)
guiSetProperty(button10, "NormalTextColour", "FFAF0000")
GUIEditor.label[1] = guiCreateLabel(10, 413, 134, 15, "by : MR_Mahmoud_M.H", false, window1)
guiLabelSetColor(GUIEditor.label[1], 0, 175, 0)
GUIEditor.label[2] = guiCreateLabel(243, 65, 35, 38, "*", false, window1)
guiSetFont(GUIEditor.label[2], "sa-gothic")
guiLabelSetColor(GUIEditor.label[2], 255, 0, 0)
GUIEditor.label[3] = guiCreateLabel(243, 137, 40, 39, "*", false, window1)
guiSetFont(GUIEditor.label[3], "sa-gothic")
guiLabelSetColor(GUIEditor.label[3], 0, 255, 36)
GUIEditor.label[4] = guiCreateLabel(243, 203, 38, 41, "*", false, window1)
guiSetFont(GUIEditor.label[4], "sa-gothic")
guiLabelSetColor(GUIEditor.label[4], 255, 0, 0)
GUIEditor.label[5] = guiCreateLabel(243, 269, 38, 41, "*", false, window1)
guiSetFont(GUIEditor.label[5], "sa-gothic")
guiLabelSetColor(GUIEditor.label[5], 0, 255, 36)
GUIEditor.label[6] = guiCreateLabel(243, 331, 38, 41, "*", false, window1)
guiSetFont(GUIEditor.label[6], "sa-gothic")
guiLabelSetColor(GUIEditor.label[6], 255, 0, 0)
AKLAK = guiCreateButton(203, 400, 123, 29, "اغلاق الوحة", false, window1)
guiSetProperty(AKLAK, "NormalTextColour", "FFFD0000")
GUIEditor.label[7] = guiCreateLabel(391, 383, 77, 45, "M.H", false, window1)
guiSetFont(GUIEditor.label[7], "sa-header")
guiLabelSetColor(GUIEditor.label[7], 175, 0, 0)
   guiSetVisible (window1, false)
bindKey( key, "down",function()
guiSetVisible (window1, not guiGetVisible (window1) )
showCursor ( guiGetVisible (window1) )
end)

-------------زر اغلاق الوحة+زر 1 الصوات من مود الراديو

addEventHandler('onClientGUIClick',root,
function()
if source == AKLAK then
guiSetVisible(window1,false) showCursor(false)
elseif source==button1 then
triggerEvent('openspwnd',localPlayer)
elseif source==button6 then
triggerEvent('rtb',localPlayer)

guiSetVisible(window1,false)---------------أغلاق لوحة 1 عند فتح لوحة 2
end
end
)

اطرح كود النافذه الاخرى

+

bindKey( key, "down",function()
guiSetVisible (window1, not guiGetVisible (window1) )
showCursor ( guiGetVisible (window1) )

triggerEvent('rtb',localPlayer) 
end)

تفضل ذا حل مؤقت بما انك لم تطرح كود النافذه الثانيه

وفي المره القادمه استخدم

<>

رجاء

Posted (edited)

الكود الثاني



 

------------------------------------------
-- Author: xXMADEXx						--
-- Name: 3D Speakers 2.0				--
-- File: client.lua						--
-- Copyright 2013 ( C ) Braydon Davis	--
------------------------------
-- Variables				--
------------------------------
local subTrackOnSoundDown = 0.1	-- The volume that goes down, when the player clicks "Volume -"
local subTrackOnSoundUp = 0.1	-- The volume that goes up, when the player clicks "Volume +"


function print ( message, r, g, b )
	outputChatBox ( message, r, g, b )
end

------------------------------
-- The GUI					--
------------------------------
local rx, ry = guiGetScreenSize ( )
button = { }
window = guiCreateWindow( ( rx - 295 ), ( ry / 2 - 253 / 2 ), 293, 253, "Speakers", false)
guiWindowSetSizable(window, false)
guiSetVisible ( window, false )
CurrentSpeaker = guiCreateLabel(8, 33, 254, 17, "Do you have a currently have a speaker: No", false, window)
volume = guiCreateLabel(10, 50, 252, 17, "Current Volume: 100%", false, window)
pos = guiCreateLabel(10, 66, 252, 15, "X: 0 | Y: 0 | Z: 0", false, window)
guiCreateLabel(11, 81, 251, 15, "URL:", false, window)
--url = guiCreateEdit(11, 96, 272, 23, "", false, window)  
url = guiCreateEdit(11, 96, 272, 23, "http://roscripts.netau.net/sound.mp3", false, window)  
button["place"] = guiCreateButton(9, 129, 274, 20, "Create Speaker", false, window)
button["remove"] = guiCreateButton(9, 159, 274, 20, "Destroy Speaker", false, window)
button["v-"] = guiCreateButton(9, 189, 128, 20, "Volume -", false, window)
button["v+"] = guiCreateButton(155, 189, 128, 20, "Volume +", false, window)
button["close"] = guiCreateButton(9, 219, 274, 20, "Exit", false, window)  

--------------------------
-- My sweet codes		--
--------------------------
local isSound = false
addEvent ( "onPlayerViewSpeakerManagment", true )
addEventHandler ( "onPlayerViewSpeakerManagment", root, function ( current )
	local toState = not guiGetVisible ( window ) 
	guiSetVisible ( window, toState )
	showCursor ( toState ) 
	if ( toState == true ) then
		guiSetInputMode ( "no_binds_when_editing" )
		local x, y, z = getElementPosition ( localPlayer )
		guiSetText ( pos, "X: "..math.floor ( x ).." | Y: "..math.floor ( y ).." | Z: "..math.floor ( z ) )
		if ( current ) then guiSetText ( CurrentSpeaker, "Do you currently have a speaker: Yes" ) isSound = true
		else guiSetText ( CurrentSpeaker, "Do you currently have a speaker: No" ) end
	end
end )

addEventHandler ( "onClientGUIClick", root, function ( )
	if ( source == button["close"] ) then
		guiSetVisible ( window, false ) 
		showCursor ( false )
	elseif ( source == button["place"] ) then
		if ( isURL ( ) ) then
			triggerServerEvent ( "onPlayerPlaceSpeakerBox", localPlayer, guiGetText ( url ), isPedInVehicle ( localPlayer ) )
			guiSetText ( CurrentSpeaker, "Do you currently have a speaker: Yes" )
			isSound = true
			guiSetText ( volume, "Current Volume: 100%" )
		else
			print ( "You need to enter a URL.", 255, 0, 0 )
		end
	elseif ( source == button["remove"] ) then
		triggerServerEvent ( "onPlayerDestroySpeakerBox", localPlayer )
		guiSetText ( CurrentSpeaker, "Do you currently have a speaker: No" )
		isSound = false
		guiSetText ( volume, "Current Volume: 100%" )
	elseif ( source == button["v-"] ) then
		if ( isSound ) then
			local toVol = math.round ( getSoundVolume ( speakerSound [ localPlayer ] ) - subTrackOnSoundDown, 2 )
			if ( toVol > 0.0 ) then
				print ( "Volume set to "..math.floor ( toVol * 100 ).."%!", 0, 255, 0 )
				triggerServerEvent ( "onPlayerChangeSpeakerBoxVolume", localPlayer, toVol )
				guiSetText ( volume, "Current Volume: "..math.floor ( toVol * 100 ).."%" )
			else
				print ( "The volume cannot go any lower.", 255, 0, 0 )
			end
		end
	elseif ( source == button["v+"] ) then
		if ( isSound ) then
			local toVol = math.round ( getSoundVolume ( speakerSound [ localPlayer ] ) + subTrackOnSoundUp, 2 )
			if ( toVol < 1.1 ) then
				print ( "Volume set to "..math.floor ( toVol * 100 ).."%!", 0, 255, 0 )
				triggerServerEvent ( "onPlayerChangeSpeakerBoxVolume", localPlayer, toVol )
				guiSetText ( volume, "Current Volume: "..math.floor ( toVol * 100 ).."%" )
			else
				print ( "The volume cannot go any higher.", 255, 0, 0 )
			end
		end
	end
end )

speakerSound = { }
addEvent ( "onPlayerStartSpeakerBoxSound", true )
addEventHandler ( "onPlayerStartSpeakerBoxSound", root, function ( who, url, isCar )
	if ( isElement ( speakerSound [ who ] ) ) then destroyElement ( speakerSound [ who ] ) end
	local x, y, z = getElementPosition ( who )
	speakerSound [ who ] = playSound3D ( url, x, y, z, true )
	setSoundVolume ( speakerSound [ who ], 1 )
	setSoundMinDistance ( speakerSound [ who ], 15 )
	setSoundMaxDistance ( speakerSound [ who ], 20 )
	if ( isCar ) then
		local car = getPedOccupiedVehicle ( who )
		attachElements ( speakerSound [ who ], car, 0, 5, 1 )
	end
end )

addEvent ( "onPlayerDestroySpeakerBox", true )
addEventHandler ( "onPlayerDestroySpeakerBox", root, function ( who ) 
	if ( isElement ( speakerSound [ who ] ) ) then 
		destroyElement ( speakerSound [ who ] ) 
	end
end )

--------------------------
-- Volume				--
--------------------------
addEvent ( "onPlayerChangeSpeakerBoxVolumeC", true )
addEventHandler ( "onPlayerChangeSpeakerBoxVolumeC", root, function ( who, vol ) 
	if ( isElement ( speakerSound [ who ] ) ) then
		setSoundVolume ( speakerSound [ who ], tonumber ( vol ) )
	end
end )

function isURL ( )
	if ( guiGetText ( url ) ~= "" ) then
		return true
	else
		return false
	end
end

function math.round(number, decimals, method)
    decimals = decimals or 0
    local factor = 10 ^ decimals
    if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor
    else return tonumber(("%."..decimals.."f"):format(number)) end
end

addEvent('openspwnd',true)
addEventHandler('openspwnd',root,function()
guiSetVisible (window, not guiGetVisible (window) )
showCursor ( guiGetVisible (window) )
end)

 

Edited by MR_Mahmoud
Posted

بتخلي الثاني الكود هذا 

بهذي الطريقه

addEvent('openspwnd',true)
addEventHandler('openspwnd',root,function(state)
    if state~=nil then
guiSetVisible (window,state )
showCursor (state)
    else
      guiSetVisible (window, not guiGetVisible (window) )
showCursor ( guiGetVisible (window) )
    end
end)
bindKey( key, "down",function()
guiSetVisible (window1, not guiGetVisible (window1) )
showCursor ( guiGetVisible (window1) )

triggerEvent('rtb',localPlayer,false) 
end)

غير مجرب بدل ذي الاكواد باللي عندك

Posted

button["place"]  = يشغل الصوت 

button["remove"]  = يطفي الصوت 

button["v-"]  = يقلل الصوت

button["v+"] = يرفع الصوت
 

button["close"]  = يغلق النافذة

بدلهم باسماء ازرارك وحط الكود حق الجيو بدل الموجود : )

Posted
39 minutes ago, iMr.WiFi..! said:

button["place"]  = يشغل الصوت 

button["remove"]  = يطفي الصوت 

button["v-"]  = يقلل الصوت

button["v+"] = يرفع الصوت
 

button["close"]  = يغلق النافذة

بدلهم باسماء ازرارك وحط الكود حق الجيو بدل الموجود : )

اخي انت عرفت وش ابي ؟

عندي مود اوحة تحكم فيها زر فتح لوحة اخرا

 

انا سويت كل شي كودات بس في كود ناقص ها يلي ابيه انه لما افتح لوحة التحكم بعدين زر لوحة اخرا يشتغل ومافي اي مشكلة اضغط زر يختفي الوحة تحكم ويفتح لوحة الي انا حاططها في زر بس لما ارجع اضغط الأف مثال اف 5 لما ارجع اضغط اف 5 يفتحو التنتين هية لازم تختفي الوحة بتاعت الزر بس عندي ماتختفي هاد الي ابيه انا وشكرا لردك علا  الموضوع ارجو ان تساعدوني

Posted

جداً سهل اخوي : ) 

استعمل 

addCommandHandler

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

وسوي اظهار النافذة 

وبعدين روح عند الزر حقك ثم

سوي

executeCommandHandler

ويشتغل المود بلوحة اخرى ~

  • Like 1
Posted

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

اسم زر  عندي هوة   

button1

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