10.12.2014, 15:21
2.
pawn Код:
new str[16] = "523.522288881", point, decimals;
point = strfind(str, ".", false);
for(new i=(point+1); i<strlen(str); i++)
{
if(str[i] != EOS)
{
decimals++;
}
}
if(decimals > 2)
{
SendClientMessage(playerid, 0xFF0000AA, "You are not allowed to enter more than 2 decimals");
}