Random isn't working properly :S
#1

The random isn't working properly, there are 3 chances to success and 7 to fail
the thing is that sometimes its just succeeds for a few times in a row and then fails a few times in a row
That's the code:
pawn Код:
new Chance = random(10);
            if(PlayerInfo[playerid][pGunSkill] <= 50 && Chance == 3 || Chance == 6)
            {
                AssmblingSucessLuck[playerid] = 1;
                AssmblingResult(playerid);
            }
            else if(PlayerInfo[playerid][pGunSkill] <= 50 && Chance == 1 || Chance == 2 || Chance == 4 || Chance == 5 || Chance == 7 || Chance == 8 || Chance == 9 || Chance == 10)
            {
                AssmblingFail[playerid] = 1;
                AssmblingResult(playerid);
            }
And sometimes nothing happeneds
Reply


Messages In This Thread
Random isn't working properly :S - by Maxips2 - 12.07.2010, 09:28
Re: Random isn't working properly :S - by Grim_ - 12.07.2010, 09:29
Re: Random isn't working properly :S - by Maxips2 - 12.07.2010, 09:33
Re: Random isn't working properly :S - by FreshKilla - 12.07.2010, 09:35
Re: Random isn't working properly :S - by Donny_k - 12.07.2010, 09:42
Re: Random isn't working properly :S - by Maxips2 - 12.07.2010, 10:04
Re: Random isn't working properly :S - by Donny_k - 12.07.2010, 10:10
Re: Random isn't working properly :S - by Maxips2 - 12.07.2010, 10:27
Re: Random isn't working properly :S - by Donny_k - 12.07.2010, 10:34
Re: Random isn't working properly :S - by Maxips2 - 12.07.2010, 11:10

Forum Jump:


Users browsing this thread: 3 Guest(s)