04.02.2014, 15:32
I have no idea why does this happen...
As soon as I add this specific piece of code PAWNO starts lagging hardly and crashing...
I've tried various ways, like instead of switch with if(GetPlayerScore...) without new score = GetPlayerScore and everything I know...
How can I fix that? Is there any other way to set rank of player?
As soon as I add this specific piece of code PAWNO starts lagging hardly and crashing...
Код:
stock SetPlayerRank(playerid) { new score = GetPlayerScore(playerid); switch(score) { case 0..499: PlayerRank[playerid] = 1; case 500..1999: PlayerRank[playerid] = 2; case 2000..3999: PlayerRank[playerid] = 3; case 4000..7999: PlayerRank[playerid] = 4; case 8000..9999: PlayerRank[playerid] = 5; case 10000..14999: PlayerRank[playerid] = 6; case 15000..24999: PlayerRank[playerid] = 7; case 25000..29999: PlayerRank[playerid] = 8; case 30000..39999: PlayerRank[playerid] = 9; case 40000..99999: PlayerRank[playerid] = 10; } return 1; }
How can I fix that? Is there any other way to set rank of player?