Aller au contenu principal

strfloat

attention

La fonctionnalité de type fonction a été ajoutée dans la version omp v1.1.0.2612 et ne fonctionne pas avec les versions antérieures !

Description​

Converts a string to a float.

NameDescription
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​

remarque

This function is the same as floatstr.

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