13.09.2013, 22:53
A script only ends if it encounters a) the closing brace at the end of the function or b) a return statement. You set CheckPoint[playerid] to 2. But the script doesn't end there. The following if-statments checks if CheckPoint[playerid] is equal to 2. It is, because you just set it to 2 yourself. So that block is executed as well. This continues down the chain.
I recommend using a switch statement (easy) or an array of coordinates (slightly more difficult, but easier to maintain).
I recommend using a switch statement (easy) or an array of coordinates (slightly more difficult, but easier to maintain).
pawn Код:
switch(CheckPoint[playerid])
{
case 1: {}
case 2: {}
case 3: {}
// ...
}