View Single Post
Effeff
AlliedModders Donor
Join Date: Jan 2019
Location: discord: ff#0533
Old 01-27-2021 , 00:57   Re: [CS:GO/Any] Top System [MySQL] (v1.0 | 25 January 2020)
Reply With Quote #6

As I wrote 2 comments above, I want to create some modules (one for KDR, one for KPR). I have some problems though.

KDR and KPR are both floats, but your plugin does not appear to support floats.

Also, there are two ways (I think) that I can implement KDR. One is by combining the code of the Kills and Deaths modules into one plugin, and then creating three Top Categories in this plugin (kills, deaths, and KDR). However, this means I cannot implement KPR, which would also need to use Kills. To implement KPR, I would have to also combine it into the plugin, and at this point, why use modules at all?

Instead, I can implement KDR by using Top_AddCategory on categories that already exist, "kills" and "deaths", because you made these return the index if they do exist. This has a problem though - I don't want to accidentally create these categories if the KDR module loads first. Maybe you can split this into Top_FindCategory? Anyway after this, I can use Top_GetPoints to get the Kills and Deaths. This, however, also has some problems.

One problem is, I need to make sure that the database updates kills and deaths when they happen, before I try to use GetPoints to update the KDR.
Another problem is, there does not exist Top_SetPoints. So, I have to do Top_TakePoints(client, Top_GetPoints(client, g_iTopId)); and then after this I do Top_AddPoints(client, kdr).

If you cannot or do not want to make these changes to solve this, that is okay

Last edited by Effeff; 01-27-2021 at 01:25.
Effeff is offline