11.06.2016, 15:48
Quote:
Using ".." is invalid and you can't check if something is equal to more than 1 value. ".." is used in switch for integers only. Also you keep calling GetPlayerDistanceFromPlayer function. Store what distance returned to a local variable and then check if for example "distance >= 10.1 && distance <= 20.0".
|
Код:
new distance;
Код:
case 25: { if (PlayerData[playerid][pBeanBag]) damage = 0; else { distance = GetPlayerDistanceFromPlayer(playerid, damagedid); //line 15970 if (distance <= 10) { if (bodypart == 9) damage = 85; else damage = 70; } if (distance >= 10.1 && distance <= 20.0) { if (bodypart == 9) damage = 65; else damage = 45; } if (distance == 20.1 && distance <= 30.0) { if (bodypart == 9) damage = 45; else damage = 30; } if (distance >= 30.1) { if (bodypart == 9) damage = 35; else damage = 25; } } }
Код:
(15970) : warning 213: tag mismatch