Ratio help.. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Ratio help.. (
/showthread.php?tid=183547)
Ratio help.. -
The_Moddler - 16.10.2010
That's the question, how is the formula to get the rate of kill from a player?
Is it the kills divided into 100?
Thanks
Re: Ratio help.. -
Babul - 16.10.2010
hm...
Код:
100/(kills+deaths)*kills
i kill 2 players, die 6 times, thats 2:6, 8 deaths at all: 100/(2+6)*2, thats 12.5%*2= 24% killratio...
i kill 10 players, die 1 time, thats 10:1, 11 deaths at all: 100/(10+1)*10, thats 9.11%*10= 91.11%.
i kill 1 players, die 0 times, thats 1:0, 1 death at all: 100/(1+0)*1, thats 100.0%*1= 100.00%
works.
you were VERY close, just about to find out yourself ^^
ah i missed 1 case:
i kill 0 players, die 1 time, thats 0:1, 1 deaths at all: 100/(0+1)*0, thats 00.0%*0= 0% killratio lolo