15.11.2013, 21:34
How to make so when someone does command like /casino
it gives them a chance to win or lose
so 5% of wining
95% of losing
it gives them a chance to win or lose
so 5% of wining
95% of losing
if(random(100) < 5) // 5%
{
// winner
}
#include <a_samp>
main() {
new r[100];
for(new i = 0; i < 100; i++)
{
r[random(100)]++;
}
for(new i = 0; i < 100; i++)
{
printf("Number: %i Chosen: %i", i, r[i]);
}
return 1;
}