Quote:
Originally Posted by lagaar
Can you tell me an example?
|
He doesn't understand weapon chance blocks.
What you could do is this:
Code:
actionWeaponChance(id)
{
// when player steps on block
// check cooldown if you want
// random chance for getting a weapon
if( random(100) < 30 )
{
// player beat the 30% chance for weapon
// give the weapon (in this example, ak47)
new ent = give_item(id, "weapon_ak47");
// set the weapon's ammo
cs_set_weapon_ammo(ent, 1); // 1 bullet in clip
// set the backpack ammo
cs_set_user_bpammo(ent, CSW_AK47, 0); // no bp ammo
}
}
__________________