08.08.2011, 11:19
oh, no, my solution will fail then. a math calculation for ranks should do fine. lets say for each 100 kills, you get 1 rank added?
so for each 100 kills the rank will increase by 1. iam afraid that you want to make a non ordered promotion "table" like 0 kills:rank0, 10 kills:rank1, 100 kills: rank3, 400 more kills each: rank4 etc? this would make it a bit more complex. stick to a linear interpolation for ranks, it needs 1 calculation only.
000-099 kills: still rank 0.
100-199 rank 1 etc.
due the rank divided by 100 gives a float value, the floatround_floor will make it an integer again, whcih can be used to point to the rank array.
Код:
new RankPromotion=floatround(PlayerInfo[playerid][pKills]/100,floatround_floor);
000-099 kills: still rank 0.
100-199 rank 1 etc.
due the rank divided by 100 gives a float value, the floatround_floor will make it an integer again, whcih can be used to point to the rank array.