Need help with kill/death ratio
#4

Quote:
Originally Posted by fiki574
Посмотреть сообщение
pawn Код:
format(string, sizeof(string), "Kills: [%d] - Deaths: [%d] - K/D Ratio: [%f] ", PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths], floatround(PlayerInfo[playerid][Kills]/PlayerInfo[playerid][Deaths]));
The usage of 'floatround' would convert that back into an integer. So the results might come out a little weird with that code.

pawn Код:
format(string, sizeof(string), "Kills: [%d] - Deaths: [%d] - K/D Ratio: [%.2f] ", PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths], (PlayerInfo[playerid][Kills] / PlayerInfo[playerid][Deaths]));
Reply


Messages In This Thread
Need help with kill/death ratio - by barts - 15.02.2014, 13:03
Re: Need help with kill/death ratio - by fiki574 - 15.02.2014, 13:07
Re: Need help with kill/death ratio - by MBilal - 15.02.2014, 13:10
Re: Need help with kill/death ratio - by Threshold - 15.02.2014, 13:20
Re: Need help with kill/death ratio - by Konstantinos - 15.02.2014, 13:25
Re: Need help with kill/death ratio - by barts - 15.02.2014, 13:35
Re: Need help with kill/death ratio - by Konstantinos - 15.02.2014, 13:38
Re: Need help with kill/death ratio - by ReD_HunTeR - 15.02.2014, 13:39
Re: Need help with kill/death ratio - by barts - 15.02.2014, 13:52

Forum Jump:


Users browsing this thread: 1 Guest(s)