Jump to content

فنكشنات اسل منجرx[طلب]X


mahmod3

Recommended Posts

2 minutes ago, FaHaD said:

Client :

 


wnd = guiCreateWindow(396, 226, 514, 400, "بواسطة الغرياني", false)
guiWindowSetSizable(wnd, false)
guiSetAlpha(wnd, 0.82)
guiSetVisible(wnd,false)
soal = guiCreateEdit(46, 83, 427, 39, "", false, wnd)
soall = guiCreateLabel(225, 56, 225, 27, "هنا السؤال", false, wnd)
flos = guiCreateEdit(46, 200, 131, 43, "", false, wnd)
egabaa = guiCreateLabel(406, 177, 77, 23, "الاجابه", false, wnd)
egaba = guiCreateEdit(373, 200, 131, 43, "", false, wnd)
floss = guiCreateLabel(70, 177, 77, 23, "عدد الفلوس", false, wnd)
ersal = guiCreateButton(205, 266, 121, 41, "ارسال", false, wnd)
guiSetProperty(ersal, "NormalTextColour", "FFFFFFFF")
close = guiCreateButton(205, 331, 121, 41, "اغلاق", false, wnd)
guiSetProperty(close, "NormalTextColour", "FFFFFFFF")    



function open (     )
    if guiGetVisible ( wnd ) then
            guiSetVisible ( wnd,false )
            showCursor ( false )
    else
            guiSetVisible ( wnd,true )
            showCursor ( true )
    end
end
bindKey("F5","down",open)


addEventHandler ( 'onClientGUIClick',root,
    function (      )
        if ( source == close ) then 
            guiSetVisible ( wnd,false )
            showCursor ( false )
        elseif ( source == ersal ) then
            local _text = guiGetText ( soal )
            local _flos = guiGetText ( flos )
            local _egaba = guiGetText ( egaba )
        if ( _text ~= "" and tonumber ( _flos ) and _egaba ~= "" ) then
            triggerServerEvent ( 'soal',localPlayer,_text,_flos,_egaba )
        end
    end
end
)

 

 

Server :

 


addEvent ( 'soal',true )
addEventHandler ( 'soal',root,
    function ( text,flos,egaba )
    	if ( text and flos and egaba ) then
    		_flos = flos
    		_egaba = egaba
			outputChatBox ( "السؤال هوا :"..text,root,255,255,255 )
		end
    end
)
addEventHandler ( 'onPlayerChat',root,
	function ( message )
		if ( message and message == _egaba and _egaba ~= nil ) then
			givePlayerMoney ( source,_flos )
			_egaba = nil
		end
	end
)

 

واو مافني فاهم شي في الي انت مسويه ياريت شرح للسويته

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...