Jump to content

Item Loot Chance


ahmedo01

Recommended Posts

Posted

Hey guys,

I m writing a survival gamemode so there will be a lot of loots. I want to spawn those items with chance. Like M4 has got a chance %0,05 but Shotgun has got %1 chance to drop. How can i do this?

Posted

You can do random a number from 0 - 1000, then if number is less than 5 (0.05 %), give M4, if number is from 5 to 100, give him Shotgun, if number is from 100 - 300 give him something else and so on. This would work

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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