SA-MP Forums Archive
help ratio - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help ratio (/showthread.php?tid=281864)



help ratio - Horrible - 08.09.2011

solved by lorenc__


Re: help ratio - PrawkC - 08.09.2011

Not sure exactly, but try
pawn Код:
new Float:ratio = kills[playerid] / death[playerid];
format(rstring, sizeof(rstring), "Ratio : %0.2f", ratio );



Re: help ratio - =WoR=Varth - 08.09.2011

%.2f


Re: help ratio - Horrible - 08.09.2011

still cant.....
if i have kill or dead more than 0
ratio will "1"


Re: help ratio - Lorenc_ - 08.09.2011

pawn Код:
floatdiv(kills[playerid], death[playerid])
Try using floatdiv aka Float Divide


Re: help ratio - =WoR=Varth - 08.09.2011

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
%.2f
Have you tried this?


Re: help ratio - Horrible - 08.09.2011

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
Have you tried this?
Код:
This forum requires that you wait 120 seconds between posts. Please try again in 18 seconds.
yes still not works