Jump to content

[HELP] K/D


Recommended Posts

define table:
local table = {};
player joins: 
table[player] = 0; 
when a player kills another: 
table[killer] = table[killer] + 1;  
To see how much he have: outputChatBox(tostring(table[playerYouWantToGetKillsOf]));

You store them when they kill someone, those are not stored by default so there’s no getPlayerKillDeaths

  • Thanks 1
Link to post
  • Moderators

Are you interested about how to calculate K/D?

It's kills count / deaths count, a simple division... just make sure deaths count is not 0 because you can't divide by zero.

  • Thanks 1
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...