It's unable to divide with zero.
If there are deaths, KPD will be equal with the result of division between kills and deaths.
Else, if there are no deaths, KPD will be equal with kills because it's now allowed to divide with zero.
PHP Code:
static Float: fKPD, iKills, iDeaths;
iKills = GetKills( iPlayer ), iDeaths = GetDeaths( iPlayer );
fKPD = iDeaths ? float( iKills ) / float( iDeaths ) : float( iKills );
/*
if( iDeaths > 0 ) fKPD = float( iKills ) / float( iDeaths );
else if( iDeaths == 0 ) fKPD = float( iKills );
*/
client_print( iPlayer, print_chat, "KPD %0.2f", fKPD );
// Example output: KPD 1.74
__________________