Kill deaths ratio how to make?
#1

How can i make it show kills death ratio to?
pawn Код:
dcmd_stats(playerid, params[])
{
  #pragma unused params
  new string[128];

  format(string,sizeof(string),"P-Stats: kills: %d deaths: %d Admin Level: %d ViP: %d Cash:  %d",pInfo[playerid][kills],pInfo[playerid][deaths],pInfo[playerid][level],pInfo[playerid][vip],pInfo[playerid][money]);
    SendClientMessage(playerid,oranje,string);
    return 1;
}
Reply
#2

It'd on the wiki but might of been hard to find as it is under as file functions.
pawn Код:
new Float:ratio=floatdiv(PKills[playerid], PDeaths[playerid]);
format(str, 256, "%d %d %.2f", PKills[playerid], PDeaths[playerid], ratio);
https://sampwiki.blast.hk/wiki/File_Functions
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)