18.08.2014, 15:50
I'm trying to present a percentage in a dialog. It's the percentage of kills from your total kills and deaths.
I did:
But in the dialog is just shows as 0%, even though my kills and deaths are set as 234 and 76.
I did:
Код:
new total, Float:total2; total = pData[playerid][Kills] + pData[playerid][Deaths]; total2 = pData[playerid][Kills] / total; format(tmp, 120, "{FFFFFF}You've killed {8CFF00}%d {ffffff}times and died {8CFF00}%d {FFFFFF}times, giving you a kill rate of %d%%,\n", pData[playerid][Kills], pData[playerid][Deaths], floatround(total2)); strcat(str, tmp);