#StrOnG_,) Posted January 12, 2016 Posted January 12, 2016 السلام عليكم ممكن مثال لهذا الفنكشن ؟ math.random ابي اذا يكتب كلمه باف 8 يعطي اسلحة عشوائية محددة وشكراً Quote "I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them, I'm just playing with ya. I don't care where the top is, Leave me at the bottom, let me work for it." _________________________________________________________________________________________________________________ ACM W_#9661
Abdul KariM Posted January 12, 2016 Posted January 12, 2016 عليكم السلام شوف هذا الشرح من اخونا زاحف https://forum.multitheftauto.com/viewtopic.php?f=164&t=57985 وشوف هذا المثال الي تبيه TheWeapon = { 38 ,30 ,25 } addCommandHandler("GiveMe", function ( player , cmd ) giveWeapon( player,TheWeapon[ math.random ( #TheWeapon ) ]) end ); بالتوفيق ان شاء الله [ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة ] https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني
#StrOnG_,) Posted January 12, 2016 Author Posted January 12, 2016 عليكم السلام شوف هذا الشرح من اخونا زاحف https://forum.multitheftauto.com/viewtopic.php?f=164&t=57985 وشوف هذا المثال الي تبيه TheWeapon = { 38 ,30 ,25 } addCommandHandler("GiveMe", function ( player , cmd ) giveWeapon( player,TheWeapon[ math.random ( #TheWeapon ) ]) end ); بالتوفيق ان شاء الله مشكور , امين وياك ^ Quote "I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them, I'm just playing with ya. I don't care where the top is, Leave me at the bottom, let me work for it." _________________________________________________________________________________________________________________ ACM W_#9661
SycroX Posted January 12, 2016 Posted January 12, 2016 (edited) addCommandHandler("TakeWep", function (plr) local RandomWeapon = math.random(0,38) giveWeapon(plr, RandomWeapon) exports["guimessages"]:outputServer(plr,"You Take"..tonumber(RandomWeapon).." Weapon) From Your Random Given",0,255,0) end ) Edited January 12, 2016 by Guest Chillin' with some demons, satans and vamps
#StrOnG_,) Posted January 12, 2016 Author Posted January 12, 2016 addCommandHandler("TakeMoney", function (plr) local RandomMoney = math.random(100,1000) setPlayerMoney(plr, RandomMoney) exports["guimessages"]:outputServer(plr,"You Take"..tonumber(RandomMoney).."$) From Your Random Given",0,255,0) end ) تشوف ؟ ولا اجيب لك نظارات ؟ قلت اسلحة مو فلوس + فادوني فوق ! Quote "I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them, I'm just playing with ya. I don't care where the top is, Leave me at the bottom, let me work for it." _________________________________________________________________________________________________________________ ACM W_#9661
SycroX Posted January 12, 2016 Posted January 12, 2016 عدلتها اهو يجيب لك من سلاح 0 لي 38 الخلاط و يعطيك واحد منهم طبعا لو تبي تجيب اسم السلاح استعمل getWeaponNameFromID Chillin' with some demons, satans and vamps
#StrOnG_,) Posted January 12, 2016 Author Posted January 12, 2016 عدلتها اهو يجيب لك من سلاح 0 لي 38 الخلاط و يعطيك واحد منهم # قلت فادوني فوق عبد الكريم عطاني الي ابيه ومشكور. Quote "I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them, I'm just playing with ya. I don't care where the top is, Leave me at the bottom, let me work for it." _________________________________________________________________________________________________________________ ACM W_#9661
SycroX Posted January 12, 2016 Posted January 12, 2016 عفو بس طريقتي شي و طريقة عبد الكريم شي هو مسوي جدول و انا مسوي من سلاح الي سلاح تبي تسوي بطريقة عبد الكريم هي صح بس هتقعد تضيف كل الاسلحة فلجدول Chillin' with some demons, satans and vamps
Abdul KariM Posted January 12, 2016 Posted January 12, 2016 عفوبس طريقتي شي و طريقة عبد الكريم شي هو مسوي جدول و انا مسوي من سلاح الي سلاح تبي تسوي بطريقة عبد الكريم هي صح بس هتقعد تضيف كل الاسلحة فلجدول ردي كافي وبعدين لو انت سويت يختار من 10 الى 1000 بعض في بعض الارقام مالها وجود بالاصح مالها سلاح وكذا راح يصير لاق او بق عشان كذا يحط ايديات صحيحة فهمت كيف عليكم السلام شوف هذا الشرح من اخونا زاحف https://forum.multitheftauto.com/viewtopic.php?f=164&t=57985 وشوف هذا المثال الي تبيه TheWeapon = { 38 ,30 ,25 } addCommandHandler("GiveMe", function ( player , cmd ) giveWeapon( player,TheWeapon[ math.random ( #TheWeapon ) ]) end ); بالتوفيق ان شاء الله مشكور , امين وياك ^ العفو , حياك الله [ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة ] https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني
MuhannaDx Posted January 12, 2016 Posted January 12, 2016 Weapon = { "colt 45", "mp5", "ak-47", "tec-9", "minigun", } function MuhannaDxP( command ) if command == "GiveMeWeapon" then Randoms = Weapon [ math.random ( #Weapon ) ] setWeapon = getWeaponIDFromName ( Randoms ) giveWeapon ( source, setWeapon,80, true ) else outputChatBox ( "غـلـط", source, 255, 0, 0, true ) end end addEventHandler ("onPlayerCommand", root, MuhannaDxP )
#StrOnG_,) Posted January 12, 2016 Author Posted January 12, 2016 ياربي يالله ياخي شفيكم ؟ قلت تمت الافادة الف مره لازم اقولها ؟ Quote "I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them, I'm just playing with ya. I don't care where the top is, Leave me at the bottom, let me work for it." _________________________________________________________________________________________________________________ ACM W_#9661
MuhannaDx Posted January 12, 2016 Posted January 12, 2016 اخوي حنا اعطيناك طرق شوف الي تعجبك وخذها ذذ
Recommended Posts