12.07.2010, 09:28
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:
And sometimes nothing happeneds
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);
}