note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
strfloat
warning
This function was added in omp v1.1.0.2612 and will not work in earlier versions!
warning
This function starts with a lowercase letter.
Description
Converts a string to a float.
Name | Description |
---|---|
const string[] | The string to convert into a float. |
Returns
The requested float value.
Examples
new string[4] = "6.9"; // A STRING holding a FLOAT.
new Float:value = strfloat(string);
SetPlayerPos(playerid, 0.0, 0.0, value);
Notes
tip
This function is the same as floatstr.
Related Functions
- floatround: Convert a float to an integer (rounding).
- float: Convert an integer to a float.