Jump to content

مشكلة في التريقر


Recommended Posts

المشكلة

الشرط ذا مب شغال

if ( guiGetText ( edit2 ) == guiGetText ( edit3 ) ) then
outputChatBox( "#0099CC[ ACEEPTED] number1 ] : #ff0000" , 255 , 0 , 0 , true )

مايطلع شي في الشات او يتنفذ  الفنكشن

 

كلنت

done = guiCreateButton(558, 162, 118, 37, "Done", false)
        edit2 = guiCreateEdit(348, 82, 143, 39, "2", false)
        edit3 = guiCreateEdit(322, 139, 174, 60, "3", false)
		edit1 = guiCreateEdit(558, 101, 116, 37, "1", false)

		local screenWidth, screenHeight = guiGetScreenSize ( ) 
		        LVL3 = guiCreateLabel(989, screenHeight - 120, screenWidth, screenHeight, "goooooooooooooooooood", false)
				
addEventHandler ( 'onClientGUIClick', root, function (  )
    if ( source == done ) then
	triggerServerEvent ( "but55lvl1", root )
       LVL1N (    )
    end
end )

		
 addEvent ( '1but55lvl1', true )
function LVL1N (    )
if ( guiGetText ( edit2 ) == guiGetText ( edit3 ) ) then
LVL1T(    )
outputChatBox( "#0099CC[ ACEEPTED] number1 ] : #ff0000" , 255 , 0 , 0 , true )
    else
LVL1F(    )
end
end  
addEventHandler ( '1but55lvl1', root, LVL1N )


function LVL1T (    )
    if ( guiGetText ( edit1 ) == "1" ) then
    triggerServerEvent ( 'TRUE11', localPlayer )
	LVL1TT(    )
else
	cancelEvent ()
    end
end



function LVL1TT(    )
guiSetVisible (done, false)
guiLabelSetColor(LVL3, 0, 255, 0)
outputChatBox( "#0099CC[ ACEEPTED] ] : #ff0000" , 255 , 0 , 0 , true )
end
 addEvent ( 'TRUE1', true )
addEventHandler ( 'TRUE1', root, LVL1TT )

function LVL1F(    )
    if ( guiGetText ( edit1 ) == "1" ) then
LVL1FF(    )
else
	cancelEvent ()
    end
end

function LVL1FF(    )
  guiSetVisible (done, true)
guiLabelSetColor(LVL3, 255, 0, 0)
outputChatBox( "#0099CC[ REFUSED] ] : #ff0000" , 255 , 0 , 0 , true )
end

 

سيرفر

local lvlchhhh12 = {"Team1", "Team2", "Team3"}
  
addEvent('but55lvl1',true) 
addEventHandler('but55lvl1', root , function ( )  
	for i=1, #lvlchhhh12 do
		local team88 = getTeamFromName(lvlchhhh12[i]) -- teams[i] means, teams[1], teams[2], teams[3], teams[4] (returns the value for each)
		if team88 then
			for _,v in ipairs ( getPlayersInTeam ( getTeamFromName(lvlchhhh12[i]) ) ) do  
triggerClientEvent(v,'1but55lvl1',v) 
end 
end
end
end)

addEvent ( 'TRUE11', true )
addEventHandler ( 'TRUE11', root, function (  )
	triggerClientEvent ( root, 'TRUE1', root )
end )

 

Edited by ☠ RaZeR ☠
تعديل
Link to comment

 

    done = guiCreateButton(558, 162, 118, 37, "Done", false)
            edit2 = guiCreateEdit(348, 82, 143, 39, "2", false)
            edit3 = guiCreateEdit(322, 139, 174, 60, "3", false)
            edit1 = guiCreateEdit(558, 101, 116, 37, "1", false)

            local screenWidth, screenHeight = guiGetScreenSize ( )
                    LVL3 = guiCreateLabel(989, screenHeight - 120, screenWidth, screenHeight, "goooooooooooooooooood", false)
                    
    addEventHandler ( 'onClientGUIClick', root, function (  )
        if ( source == done ) then
        triggerServerEvent ( "but55lvl1", root )
           LVL1N (    )
        end
    end )

            
     addEvent ( '1but55lvl1', true )
    function LVL1N (    )
    if ( guiGetText ( edit2 ) == guiGetText ( edit3 ) ) then
   if ( guiGetText ( edit1 ) == "1" ) then
       guiSetVisible (done, false)
    guiLabelSetColor(LVL3, 0, 255, 0)
    outputChatBox( "#0099CC[ ACEEPTED] ] : #ff0000" , 255 , 0 , 0 , true )
   
        else ----------- قصدي هنا على افــ الاولى
         guiSetVisible (done, true)
    guiLabelSetColor(LVL3, 255, 0, 0)
    outputChatBox( "#0099CC[ REFUSED] ] : #ff0000" , 255 , 0 , 0 , true )
    end
    end  
    addEventHandler ( '1but55lvl1', root, LVL1N )

هذا الاختصار

Edited by ☠ RaZeR ☠
  • Confused 1
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...