09.12.2016, 07:41
Hello, i have a question about switch thing, i know it used instead of if statemante but i don't know how to make this
With switch, but no all thing, i mean the last else-if statemante
Код:
new pd = APlayerData[playerid][StatsPoliceFined]; if(pd >= 0 && pd <= 50) rank = "Benginer Policeman"; else if (pd >= 51 && pd <= 100) rank = "Advanced Policeman"; else if (pd >= 101 && pd <= 200) rank = "Expert Policeman"; else if (pd >= 201 && pd <= 500) rank = "Underboss Policeman"; else if (pd >= 500) rank = "Police Big Boss";
Код:
switch(pd)
{
case 0 .. 50: rank = "Benginer Policeman";
case 51 .. 100: rank = "Advanced Policeman";
case 101 .. 200: rank = "Expert Policeman";
case 201 .. 500: rank = "Underboss Policeman";
case 500 //this how to make to be > 500?
}

