Percentage Chance
for example i have a text "blablabla" and i want to print it at the end of rounds.
i want to make 35% probable that that message will be printed :/ (like in warcraft mode.. for example your have 10% chance of becoming a mole...) |
Re: Percentage Chance
this isnt "true" random, but im pretty sure this is exactly what your are looking for
PHP Code:
|
Re: Percentage Chance
PHP Code:
|
Re: Percentage Chance
I use this:
Code:
#define chance(%1) ( %1 > random(100) ) // %1 = probability@hlev That's confusing. |
Re: Percentage Chance
thanks hlev :)
@fysiks: you can edit it :} |
Re: Percentage Chance
Quote:
|
Re: Percentage Chance
he used cvar so that you can change the message and % chance when i want :)
nvmd.. :) |
Re: Percentage Chance
Quote:
My code is an example. This is Scripting Help and not a Request forum. He just gave you a fish for dinner. I was trying to teach you how to fish. IMO :) |
| All times are GMT -4. The time now is 05:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.