28.11.2015, 20:19
Make sure EVERYTHING has the tag Float so the correct operator is used... or just use floatdiv or floatmul.
So, First of all, Set the Enota and Celota correctly by doing:
And then at the stock:
Try it and tell us if it works.
So, First of all, Set the Enota and Celota correctly by doing:
PHP код:
new Float:Celota = 270.0;
new Float:Enota = 270.0;
PHP код:
stock Procenti(playerid)
{
new string[128];
new Procent = floatround(((Enota / Celota) * 100.0), floatround_round);
format(string, sizeof(string),"There is currently %f Enot, which is exactly %.0f% percent!",Enota,float(Procent));
SendClientMessage(playerid,-1,string);
}