29.01.2012, 09:00
pawn Код:
//Make some vars
new Float:fMyFloat = 3.1;
new nMyInt;
//Cast float to int:
nMyInt = _:fMyFloat;
//nMyInt is now 3.
or
pawn Код:
//Make some vars
new Float:fMyFloat = 1.3;
//Round the float:
new nSomeInt = floatround( fMyFloat );
//nSomeInt is now 1.