SA-MP Forums Archive
KD System - 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: KD System (/showthread.php?tid=257417)



KD System - Admigo - 25.05.2011

Heey guys,

I want to make a killratio textdraw.
But how can i do it?
I dont know how to rise it.

Pls help
Admigo


Respuesta: KD System - admantis - 25.05.2011

The kill ratio is based off a division (kills / deaths) so for getting a kill ratio use this operation:

pawn Код:
new Float:kdr;
kdr = kills / deaths;



Re: KD System - Admigo - 26.05.2011

And where to put this?


Re: KD System - Admigo - 26.05.2011

Nobody knows how i can make a kd system?


Re: KD System - [DM]Kane - 26.05.2011

pawn Код:
new Kills[MAX_PLAYERS];
new Deaths[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
      Deaths[playerid]++;
      if(killerid != INVALID_PLAYER_ID && killerid != playerid)
     {
           Kills[killerid]++;
     }
     return 1;
}
Then go through this tutorial to learn how to make textdraws:
http://forum.sa-mp.com/showthread.ph...+draw+tutorial