Salam_Dadash Posted March 1, 2021 Share Posted March 1, 2021 hi everyone how i can get K/D of a player ? my kill/death scripting based on element data , anybody can help me ? or give me some functions to get it ?! Link to comment
Tekken Posted March 1, 2021 Share Posted March 1, 2021 You can use tables to store k/d way faster. Link to comment
Salam_Dadash Posted March 1, 2021 Author Share Posted March 1, 2021 i know , but I can't get k/d , what formula can i use to Get K/D ?? @Tekken Link to comment
Tekken Posted March 1, 2021 Share Posted March 1, 2021 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 1 Link to comment
Moderators Patrick Posted March 1, 2021 Moderators Share Posted March 1, 2021 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. 1 Link to comment
Salam_Dadash Posted March 1, 2021 Author Share Posted March 1, 2021 thank you everyone 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now