Floatstr

From SA-MP Wiki

Jump to: navigation, search


Converts a string to a float.


Parameters:
(const string[])
stringThe string to convert into a float


ReturnsThe requested float.


new before[4] = "6.9"; // A STRING holding a FLOAT.
SetPlayerPos(playerid, 0, 0, floatstr(before));

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

  • floatround: Convert a float to an integer (rounding).
  • float: Convert an integer to a float.
Personal tools