+Source|> Posted August 24, 2017 Share Posted August 24, 2017 سلام عليكم الحين انا مسوي هالكود local money = math.random( 1000, 3000 ) اول ما اشغل المود القيمة مثلا تجي 2800 القيمه اللي بعدها 2800 اللي بعدها 2800 ليش متتغير؟؟ Link to comment
#BrosS Posted August 24, 2017 Share Posted August 24, 2017 (edited) ورينا وين ماتتغير . ولا بدك كلما تشغل المود تتغير ؟ Edited August 24, 2017 by #BrosS وش دخلك Link to comment
+Source|> Posted August 24, 2017 Author Share Posted August 24, 2017 هذا مود اسئله فشات الفلوس ما تتغير كل سؤال يجي نفس الفلوس Link to comment
MR.StoRm Posted August 24, 2017 Share Posted August 24, 2017 1 hour ago, A7MEDENO said: هذا مود اسئله فشات الفلوس ما تتغير كل سؤال يجي نفس الفلوس ورني الكود كامل Link to comment
+Source|> Posted August 24, 2017 Author Share Posted August 24, 2017 39 minutes ago, MR.StoRm said: ورني الكود كامل local money = math.random( 1000, 3000 ) stat = nil function A7MEDENO() local math = math.random( 1, 10 ) playSoundFrontEnd( root, 45 ) outputChatBox("#3B9C9C # Write #00ff00[ " .. que[math] .. "#00ff00 ] #3B9C9C To Get Some Money #3B9C9C [ #00ff00".. money .." $ #3B9C9C] ! ",root,255,255,0,true) stat = ans[math] end setTimer( A7MEDENO, 60000, 0 ) Link to comment
XML Posted August 24, 2017 Share Posted August 24, 2017 بما ان القيمه في متغير ثابت , مستحيل تتغير كل مره الا تغيرها من داخل التايمر , لكن بهذي الحاله كودك يصير كذا: stat = nil function A7MEDENO() local money = math.random( 1000, 3000 ) local math = math.random( 1, 10 ) playSoundFrontEnd( root, 45 ) outputChatBox("#3B9C9C # Write #00ff00[ " .. que[math] .. "#00ff00 ] #3B9C9C To Get Some Money #3B9C9C [ #00ff00".. money .." $ #3B9C9C] ! ",root,255,255,0,true) stat = ans[math] end setTimer( A7MEDENO, 60000, 0 ) Link to comment
MR.StoRm Posted August 24, 2017 Share Posted August 24, 2017 2 minutes ago, A7MEDENO said: local money = math.random( 1000, 3000 ) stat = nil function A7MEDENO() local math = math.random( 1, 10 ) playSoundFrontEnd( root, 45 ) outputChatBox("#3B9C9C # Write #00ff00[ " .. que[math] .. "#00ff00 ] #3B9C9C To Get Some Money #3B9C9C [ #00ff00".. money .." $ #3B9C9C] ! ",root,255,255,0,true) stat = ans[math] end setTimer( A7MEDENO, 60000, 0 ) وين givePlayerMoney ? Link to comment
+Source|> Posted August 24, 2017 Author Share Posted August 24, 2017 (edited) Just now, MR.StoRm said: وين givePlayerMoney ? في الكود حق الجواب addEventHandler("onPlayerChat",root, function (msg,type) if ( type == 0 and msg == stat ) then outputChatBox( "#ff0000 [ ".. getPlayerName(source) .."#ff0000 ] #2B60DE Won [ #00ff00 ".. mm .." $ #2B60DE ] ! ",root,0,255,0,true) givePlayerMoney(source,money) playSoundFrontEnd( root, 30 ) stat = nil end end ) Edited August 24, 2017 by A7MEDENO Link to comment
MR.StoRm Posted August 24, 2017 Share Posted August 24, 2017 1 minute ago, A7MEDENO said: في الكود حق الجواب addEventHandler("onPlayerChat",root, function (msg,type) if ( type == 0 and msg == stat ) then outputChatBox( "#ff0000 [ ".. getPlayerName(source) .."#ff0000 ] #2B60DE Won [ #00ff00 ".. mm .." $ #2B60DE ] ! ",root,0,255,0,true) givePlayerMoney(source,mm) playSoundFrontEnd( root, 30 ) stat = nil end end ) mm اجل ؟ مو معرفة Link to comment
+Source|> Posted August 24, 2017 Author Share Posted August 24, 2017 1 minute ago, MR.StoRm said: mm اجل ؟ مو معرفة مهي mm عدلتها money اعتقد الكود يظبط لو اشيل local Link to comment
MR.StoRm Posted August 24, 2017 Share Posted August 24, 2017 3 minutes ago, A7MEDENO said: مهي mm عدلتها money عطيني الاكواد كاملة كلها وبعدله لك Link to comment
+Source|> Posted August 24, 2017 Author Share Posted August 24, 2017 Just now, MR.StoRm said: عطيني الاكواد كاملة كلها وبعدله لك money = math.random( 1000, 3000 ) que = { "سبحان الله" , "الحمد لله", "الله أكبر", "لا اله الا الله", "أستغفر الله", "الحمد لله على كل حال", "لا اله الا هو الحي القيوم", "استغفر الله واتوب اليه", } ans = { "سبحان الله" , "الحمد لله", "الله أكبر", "لا اله الا الله", "أستغفر الله", "الحمد لله على كل حال", "لا اله الا هو الحي القيوم", "استغفر الله واتوب اليه", } stat = nil function A7MEDENO() local math = math.random(1,6) playSoundFrontEnd( root, 45 ) outputChatBox("#2B60DE # Write #00ff00[ " .. que[math] .. "#00ff00 ] #2B60DE To Get Some Money #2B60DE [ #00ff00".. money .." $ #2B60DE] ! ",root,255,255,0,true) stat = ans[math] end setTimer(A7MEDENO,60000,0) -- مدة بين السؤال والاخر addEventHandler("onPlayerChat",root, function (msg,type) if ( type == 0 and msg == stat ) then outputChatBox( "#ff0000 [ ".. getPlayerName(source) .."#ff0000 ] #2B60DE Won [ #00ff00 ".. money .." $ #2B60DE ] ! ",root,0,255,0,true) givePlayerMoney( source, money ) playSoundFrontEnd( root, 30 ) stat = nil end end ) Link to comment
MR.StoRm Posted August 24, 2017 Share Posted August 24, 2017 function aQus() que = { "سبحان الله" , "الحمد لله", "الله أكبر", "لا اله الا الله", "أستغفر الله", "الحمد لله على كل حال", "لا اله الا هو الحي القيوم", "استغفر الله واتوب اليه", } ans = { "سبحان الله" , "الحمد لله", "الله أكبر", "لا اله الا الله", "أستغفر الله", "الحمد لله على كل حال", "لا اله الا هو الحي القيوم", "استغفر الله واتوب اليه", } math = math.random(1,6) money = math.random( 1000, 3000 ) playSoundFrontEnd( root, 45 ) outputChatBox("#2B60DE # Write #00ff00[ " .. que[math] .. "#00ff00 ] #2B60DE To Get Some Money #2B60DE [ #00ff00".. money .." $ #2B60DE] ! ",root,255,255,0,true) stat = ans[math] end setTimer(aQus,60000,0) function aAnswerd(msg,mtype) if ( stat ) then if ( msg == stat ) then outputChatBox( "#ff0000 [ ".. getPlayerName(source) .."#ff0000 ] #2B60DE Won [ #00ff00 ".. money .." $ #2B60DE ] ! ",root,0,255,0,true) givePlayerMoney( source, money ) playSoundFrontEnd( root, 30 ) stat = nil end end end addEventHandler ( 'onPlayerChat' , getRootElement() , aAnswerd ) اسف عالتأخير , النت علق Link to comment
+Source|> Posted August 24, 2017 Author Share Posted August 24, 2017 48 minutes ago, MR.StoRm said: function aQus() que = { "سبحان الله" , "الحمد لله", "الله أكبر", "لا اله الا الله", "أستغفر الله", "الحمد لله على كل حال", "لا اله الا هو الحي القيوم", "استغفر الله واتوب اليه", } ans = { "سبحان الله" , "الحمد لله", "الله أكبر", "لا اله الا الله", "أستغفر الله", "الحمد لله على كل حال", "لا اله الا هو الحي القيوم", "استغفر الله واتوب اليه", } math = math.random(1,6) money = math.random( 1000, 3000 ) playSoundFrontEnd( root, 45 ) outputChatBox("#2B60DE # Write #00ff00[ " .. que[math] .. "#00ff00 ] #2B60DE To Get Some Money #2B60DE [ #00ff00".. money .." $ #2B60DE] ! ",root,255,255,0,true) stat = ans[math] end setTimer(aQus,60000,0) function aAnswerd(msg,mtype) if ( stat ) then if ( msg == stat ) then outputChatBox( "#ff0000 [ ".. getPlayerName(source) .."#ff0000 ] #2B60DE Won [ #00ff00 ".. money .." $ #2B60DE ] ! ",root,0,255,0,true) givePlayerMoney( source, money ) playSoundFrontEnd( root, 30 ) stat = nil end end end addEventHandler ( 'onPlayerChat' , getRootElement() , aAnswerd ) اسف عالتأخير , النت علق بجربه #Edit: شكرا لكم Link to comment
MR.StoRm Posted August 25, 2017 Share Posted August 25, 2017 13 hours ago, A7MEDENO said: بجربه #Edit: شكرا لكم العفو بالتوفيق حبيبي 1 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