I'm trying to make a math script, however I'm having some trouble with getting floats to work.
Take this example:
PHP Code:
register_cvar("number","0.01")
public mult(id)
{
new arg[32], value1, value2
read_argv(1,arg,31)
value1 = str_to_num(arg)
value2 = get_cvar_float("number")
new output = value1*value2
client_print(id,print_chat,"[AMXX] Your number is %i",output)
return PLUGIN_HANDLED
}
Whenever I use this example I get these huge numbers like "326743734", how do I get this to work properly?