Kill deaths ratio how to make? - 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: Kill deaths ratio how to make? (
/showthread.php?tid=149228)
Kill deaths ratio how to make? -
iStarzz - 21.05.2010
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;
}
Re: Kill deaths ratio how to make? -
On_Top_Non_Stop - 21.05.2010
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