25.07.2011, 21:27
Any number multiplied by "-1" will change its sign:
Or:
pawn Code:
new value = strval(inputtext);
if(value > 0) GivePlayerMoney(playerid, value * (-1));
else
{
// The value was negative or just zero.
}
pawn Code:
new value = strval(inputtext);
if(value <= 0) value *= -1;
GivePlayerMoney(playerid, value);