Float
#5

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");
}
Reply


Messages In This Thread
Float - by Banditukas - 10.12.2014, 15:03
Re: Float - by Schneider - 10.12.2014, 15:09
Re: Float - by fordawinzz - 10.12.2014, 15:10
Re: Float - by UltraScripter - 10.12.2014, 15:20
Re: Float - by Schneider - 10.12.2014, 15:21

Forum Jump:


Users browsing this thread: 2 Guest(s)