billal Posted April 28, 2016 Share Posted April 28, 2016 ابي اعمل وضيفة لكن اللي ياخذ الوضيفة بدو يجاوب على سؤال بالاول وحبيت تطلع له رسالة بالشات تساعده لكي يجد الجواب الصح مثلا Marker = createMarker(602.177734375,868.09375,-42.9609375,"cylinder",2,0,0,0,0) skin1 = createPed(27,602.177734375,868.09375,-42.9609375,90) blip = createBlip(602.177734375,868.09375,-42.9609375,56) window = guiCreateWindow(250, 239, 307, 220, "وضيفة***", false) guiSetVisible (window , false ) edit = guiCreateEdit(82, 70, 150, 34, "", false, window ) button = guiCreateButton(10, 174, 350, 34, "خروج", false, window ) label = guiCreateLabel(82, 40, 155, 20, "كم عدد ايام السنةEntre", false, window ) lblx = guiCreateLabel(140, 130, 155, 20, " ", false, window ) addEventHandler("onClientMarkerHit",Marker, function (player) if player ~= localPlayer then return end guiSetVisible(window, true) showCursor(true) end) addEventHandler ("onClientGUIChanged",edit, function (player) if not tonumber(guiGetText(source)) then guiSetText (source,1) end if tonumber(guiGetText(source)) and tonumber(guiGetText(source)) > 365 then guiSetText (source,1) end end ) addEventHandler('onClientGUIClick', button,function ( ) guiSetVisible ( window , false ) showCursor ( false ) end ) --------- bindKey("enter", "down", function () if guiGetText ( edit ) == 365 then triggerServerEvent("TakeJob",localPlayer,skin) guiSetVisible ( window , false ) showCursor ( false ) outputChatBox('تم قبولك بالوضيفة',255,0,0,true) else outputChatBox('؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟',255,0,0,true) ----- اريد لما اللاعب يكتب رقم اقل من 365 مثلا يكتب 360يطلع له بالشات(***<360)العكس صحيح ----- لما اللاعب يكتب رقم اكبر من 365 مثلا يكتب 380يطلع له بالشات(***>380)العلامة تغيرت من >الى<هاذا المطلوب end end, false ) Link to comment
billal Posted April 28, 2016 Author Share Posted April 28, 2016 يبدو اني كتبت في القسم الغير مناسب + مب اقدر احذفه مشكلة Link to comment
_DrXenon Posted April 30, 2016 Share Posted April 30, 2016 number = guiGetText(edit) If tonumber(number) and number < 365 then OutputChatBox("...") elseif number > 365 then ... elseif number == 365 then The player gets the job end اذا بتعرف برمجة فاظن انك فهمت علي، اذا لأ فعلاغلب ما تكون فعمت Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now