Chernarus Life Random Item Chance Scriptby
Basically this script just picks a random number then gives the player that found the object or unit some items such as money and repair kits.
Script can be ran on some objects or units for a moneybag/money grab style thing to do.
You can even edit the items added to the player who found the unit or object by looking in masterarray.sqf and scrolling down to the bottom.
Installation / Usage:
All you need to do is put the script in your mission folder and in the editor place an object or a unit (like a garbage can) and put in that unit's initbox:
this addaction ["Search", "randomchance.sqf"];It will run the script. It will pick a random number between 1 and 100 then deicde what the person that searched the bin will get.
How to add new items to this:
Open masterarray.sqf in your chernarus life mission file. you will see different names for things. go all the way to the bottom and you will see the item names. geld is money, so put in:
['geld', howmuch$$here] INV_AddInventoryItem;Then if that number gets picked, it will give the player who searched the bin the amount of money that was set in the script.
You can also change the numbers in the variables to set how high the number needs to be for the person to get that item:
_rnum = floor (random 100);