Jump to content

سؤال


Recommended Posts

Posted

السلام عليكم

ممكن مثال لهذا الفنكشن ؟

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

90183-bed46f22aafe8af7dc65cdd73fff2f76-medium_jpg.jpg?buster=1481325396W_#9661

Posted

عليكم السلام

شوف هذا الشرح من اخونا زاحف

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 / اذا حاب تدعمني

Posted
عليكم السلام

شوف هذا الشرح من اخونا زاحف

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

90183-bed46f22aafe8af7dc65cdd73fff2f76-medium_jpg.jpg?buster=1481325396W_#9661

Posted (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 by Guest

Chillin' with some demons, satans and vamps

Posted
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

90183-bed46f22aafe8af7dc65cdd73fff2f76-medium_jpg.jpg?buster=1481325396W_#9661

Posted

عدلتها اهو

يجيب لك

من سلاح

0 لي

38

الخلاط

و يعطيك

واحد منهم

طبعا لو تبي تجيب اسم السلاح استعمل

getWeaponNameFromID 

Chillin' with some demons, satans and vamps

Posted
عدلتها اهو

يجيب لك

من سلاح

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

90183-bed46f22aafe8af7dc65cdd73fff2f76-medium_jpg.jpg?buster=1481325396W_#9661

Posted

-_- عفو

بس طريقتي شي و طريقة

عبد الكريم شي

هو مسوي جدول و انا مسوي من

سلاح الي سلاح

تبي تسوي بطريقة عبد الكريم هي صح

بس هتقعد تضيف كل الاسلحة فلجدول

Chillin' with some demons, satans and vamps

Posted
-_- عفو

بس طريقتي شي و طريقة

عبد الكريم شي

هو مسوي جدول و انا مسوي من

سلاح الي سلاح

تبي تسوي بطريقة عبد الكريم هي صح

بس هتقعد تضيف كل الاسلحة فلجدول

ردي كافي وبعدين لو انت سويت يختار من 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 / اذا حاب تدعمني

Posted

  
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 ) 
  
  

Posted

ياربي يالله

ياخي شفيكم ؟

قلت تمت الافادة

الف مره لازم اقولها ؟

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

90183-bed46f22aafe8af7dc65cdd73fff2f76-medium_jpg.jpg?buster=1481325396W_#9661

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

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