Float to Integer
#2

pawn Код:
new YourInteger = floatround(/*YourFloat*/, floatround_round);
EXAMPLE:

pawn Код:
CMD:float(playerid, params[])
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    new ix = floatround(x, floatround_round);
    new string[128];
    format(string,128, "%d", ix);
    print(string);
    return 1;
}
Search next time.
Reply


Messages In This Thread
Float to Integer - by MJ! - 11.07.2011, 09:33
Re: Float to Integer - by linuxthefish - 11.07.2011, 09:38

Forum Jump:


Users browsing this thread: 1 Guest(s)