L3yr Posted March 5, 2017 Posted March 5, 2017 شباب ازاى اعمل عد تنازلى مثلا بدى لما ادخل منطقه احتلال يجيلى على الجنب %1 و يعد لحد 100% او 50% انا هعمل الرقم الى بدى شكرا
L3yr Posted March 5, 2017 Author Posted March 5, 2017 1 minute ago, #BrosS said: ممكن محاولتك يالحبيب اخى انا جبت مثال عشان تفهمو قصدى انا بدى مثلا اعمل زر لو ضغط عليه يجيلى عد تنازلى مقلا من 5 الى 0 ويعطينى فلوس
#BrosS Posted March 5, 2017 Posted March 5, 2017 Just now, L3yr said: اخى انا جبت مثال عشان تفهمو قصدى انا بدى مثلا اعمل زر لو ضغط عليه يجيلى عد تنازلى مقلا من 5 الى 0 ويعطينى فلوس فهمتك وفهمت مثالك ، عالأقل حاول واحنا نساعدك لا تستسلم ، اذا ماقدرت فعلا نساعدك
L3yr Posted March 5, 2017 Author Posted March 5, 2017 6 hours ago, #BrosS said: فهمتك وفهمت مثالك ، عالأقل حاول واحنا نساعدك لا تستسلم ، اذا ماقدرت فعلا نساعدك حاضر اخى بسوى طيب اعطينى الفنكش او الكود وانا بكملو عشان مانى عارف ابدأ منين عملت اللوحه والزر ناقص هذه #Edit: 6 hours ago, #BrosS said: فهمتك وفهمت مثالك ، عالأقل حاول واحنا نساعدك لا تستسلم ، اذا ماقدرت فعلا نساعدك ?? اخى
L3yr Posted March 6, 2017 Author Posted March 6, 2017 4 hours ago, N3xT said: استعمل البروجرس بار والتايمرات ممكن الكودات بتاعتهم اخى
^iiEcoo'x_) Posted March 6, 2017 Posted March 6, 2017 function countTimer ( TimerName , number ) TimerName = setTimer(function() local count = tonumber ( number ) count = count - 1 outputChatBox ( tostring ( count ) ) end , 1 , count ) end function removeCountTimer ( TimerName ) if isTimer ( TimerName ) then killTimer ( TimerName ) end end حطه بأول الكود ^ مثال على الفنكشن addEventHandler ("onPlayerChat",root, function ( msg ) if msg == "Count" then countTimer ( Timer1 , 10 ) end end ) addEventHandler ("onPlayerChat",root, function ( msg ) if msg == "RemoveCount" then removeCountTimer ( Timer1 ) end end )
L3yr Posted March 6, 2017 Author Posted March 6, 2017 34 minutes ago, #_iMr.[E]coo said: function countTimer ( TimerName , number ) TimerName = setTimer(function() local count = tonumber ( number ) count = count - 1 outputChatBox ( tostring ( count ) ) end , 1 , count ) end function removeCountTimer ( TimerName ) if isTimer ( TimerName ) then killTimer ( TimerName ) end end حطه بأول الكود ^ مثال على الفنكشن addEventHandler ("onPlayerChat",root, function ( msg ) if msg == "Count" then countTimer ( Timer1 , 10 ) end end ) addEventHandler ("onPlayerChat",root, function ( msg ) if msg == "RemoveCount" then removeCountTimer ( Timer1 ) end end ) الف شكر اخى اجباتك بتبقا مماثله
L3yr Posted March 6, 2017 Author Posted March 6, 2017 10 minutes ago, #_iMr.[E]coo said: زبط ؟ بخلص حاجا فى ايدى وهجرب وارد عليك معا انى واثق انها هتشتغل عشان جيه منك
#Soking Posted March 6, 2017 Posted March 6, 2017 1 hour ago, #_iMr.[E]coo said: function countTimer ( TimerName , number ) TimerName = setTimer(function() local count = tonumber ( number ) count = count - 1 outputChatBox ( tostring ( count ) ) end , 1 , count ) end function removeCountTimer ( TimerName ) if isTimer ( TimerName ) then killTimer ( TimerName ) end end حطه بأول الكود ^ مثال على الفنكشن addEventHandler ("onPlayerChat",root, function ( msg ) if msg == "Count" then countTimer ( Timer1 , 10 ) end end ) addEventHandler ("onPlayerChat",root, function ( msg ) if msg == "RemoveCount" then removeCountTimer ( Timer1 ) end end ) ماراح تزبط ??? كودك كله اخطاء
^iiEcoo'x_) Posted March 6, 2017 Posted March 6, 2017 8 minutes ago, #Soking said: ماراح تزبط ??? كودك كله اخطاء طب صححه ??
L3yr Posted March 6, 2017 Author Posted March 6, 2017 1 minute ago, #BrosS said: الشغل طويل جدا , تبي أعطيك نسخة لإحتلال بالخاص ؟ ماشى اخى ياريت
#Soking Posted March 6, 2017 Posted March 6, 2017 1 hour ago, #_iMr.[E]coo said: function countTimer ( TimerName , number ) TimerName = setTimer(function() local count = tonumber ( number ) count = count - 1 outputChatBox ( tostring ( count ) ) end , 1 , count ) end function removeCountTimer ( TimerName ) if isTimer ( TimerName ) then killTimer ( TimerName ) end end حطه بأول الكود ^ مثال على الفنكشن addEventHandler ("onPlayerChat",root, function ( msg ) if msg == "Count" then countTimer ( Timer1 , 10 ) end end ) addEventHandler ("onPlayerChat",root, function ( msg ) if msg == "RemoveCount" then removeCountTimer ( Timer1 ) end end ) اولا كيف سيرفر و مافي ارقمنت الاعب في الشات و لازم التايمر تحط برمرتز الاعب في فنشنك التايمر و بنهايه سطر ٧ غير كذا انت مسوي تايمر يتكرر بحسب الكونت بس كيف كل ١ ملي ثانيه الحد الادني ٥٠ وليه تحول القيمه ل نامبر و ترجع تحولها سترينج انت سوي تحقق وخلصنا و للمعلوميه فنكشن انك تطلع رساله عادي ارقام او سترينج يعني ناقصك ارقمنت للاعب كمان و جداول للقبم حقت الكونت خخخ بكفي كذا 1
^iiEcoo'x_) Posted March 6, 2017 Posted March 6, 2017 2 hours ago, #Soking said: اولا كيف سيرفر و مافي ارقمنت الاعب في الشات و لازم التايمر تحط برمرتز الاعب في فنشنك التايمر و بنهايه سطر ٧ غير كذا انت مسوي تايمر يتكرر بحسب الكونت بس كيف كل ١ ملي ثانيه الحد الادني ٥٠ وليه تحول القيمه ل نامبر و ترجع تحولها سترينج انت سوي تحقق وخلصنا و للمعلوميه فنكشن انك تطلع رساله عادي ارقام او سترينج يعني ناقصك ارقمنت للاعب كمان و جداول للقبم حقت الكونت خخخ بكفي كذا مش انا مسويه ^
AchrefF Posted March 6, 2017 Posted March 6, 2017 1 hour ago, #_iMr.[E]coo said: مش انا مسويه ^ ياريت التصحيح له اخى لانو بيسأل عنه كل يوم
^iiEcoo'x_) Posted March 7, 2017 Posted March 7, 2017 @L3yr count = 100 addEventHandler ("onClientMarkerHit",root, function ( hitPlayer ) if hitPlayer == localPlayer then Timer = setTimer(function() count = guiProgressBarGetProgress( name ) + 1 end , 1000 , count ) isProgressFinshed () end end ) function isProgressFinshed () if isTimer ( Timer ) then if guiProgressBarGetProgress( name ) == 100 then outputChatBox ( " اكتمل احتلال " ) end end end جرب نجيب العيد ذذ
#Soking Posted March 7, 2017 Posted March 7, 2017 33 minutes ago, #_iMr.[E]coo said: @L3yr count = 100 addEventHandler ("onClientMarkerHit",root, function ( hitPlayer ) if hitPlayer == localPlayer then Timer = setTimer(function() count = guiProgressBarGetProgress( name ) + 1 end , 1000 , count ) isProgressFinshed () end end ) function isProgressFinshed () if isTimer ( Timer ) then if guiProgressBarGetProgress( name ) == 100 then outputChatBox ( " اكتمل احتلال " ) end end end جرب نجيب العيد ذذ غلططططط
#Soking Posted March 7, 2017 Posted March 7, 2017 Just now, #_iMr.[E]coo said: ايش الغلط ؟ ماراح يطلع وساله بالانتهاءو فين حق تزويد البروجرس
^iiEcoo'x_) Posted March 7, 2017 Posted March 7, 2017 1 minute ago, #Soking said: ماراح يطلع وساله بالانتهاءو فين حق تزويد البروجرس بالنسبة ل تزويد نسيته الرسالة كيف ما تطلع ؟
#Soking Posted March 7, 2017 Posted March 7, 2017 لازم تتحقق بكل مره بعد لما تزود البروجرس مو مره واحده مو معناه انك حاطها بعد التايمر ان التحقق بيصير بعده
#BrosS Posted March 7, 2017 Posted March 7, 2017 local Marker = createMarker -- ماركر الاحتلال name = guiCreateProgressBar(0.05, 0.5, 0.15, 0.033, true) -- عدل الى احداثياتك addEventHandler ("onClientMarkerHit",root, function ( hitPlayer ) if hitPlayer == localPlayer then if (source == Marker) then guiSetVisible(name,true) guiProgressBarSetProgress(name, guiProgressBarGetProgress(name) + 1) if guiProgressBarGetProgress(name) == 100 then outputChatBox ( " اكتمل احتلال " ) guiSetVisible(name, false) givePlayerMoney(10000) end end end end ) addEventHandler ("onClientMarkerLeave",root, function ( LeavePlayer ) if LeavePlayer == localPlayer then if (source == Marker) then guiSetVisible(name,false) outputChatBox ( " غادرت الاحتلال " ) end end end ) جوال
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