Posts: 294
Threads: 72
Joined: Feb 2012
Reputation:
0
Hello I want to ask, for example is it possible to make code example I want to have a 20% chance to become IGInfo [playerid] [Owner] = 1; and in the other 80% to nothing happens.
Could this be done somehow?
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
Because the indexes in PAWN starts from 0 when you have size/max a number N, it's always: 0 to (N-1).
For example, using 10 is 0-9 (which is 10 in total).
I'm not sure if you can use floating-point numbers for that case.
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
No, it's not. The max value in random is unknown and with case 0/1 you won't get 7.40% - 28.57% percent.
Posts: 294
Threads: 72
Joined: Feb 2012
Reputation:
0
I think you do not understand exactly, then these percentages which I have written have a chance to drop these numbers by random (27) rates to fall 0 or 1 is 7.40% and at Level 20 Chance parameter, which removes 20 index and becomes random (7) the chance to fall 0 or 1 becomes 28.57%