shobhit-pathak / MatchZy

MatchZy is a plugin for CS2 (Counter Strike 2) for running and managing practice/pugs/scrims/matches with easy configuration and Get5 (G5API/G5V) support as well!
https://shobhit-pathak.github.io/MatchZy/
MIT License
221 stars 55 forks source link

[REQ] ID for saved Nades #98

Open dreaNN1337 opened 4 months ago

dreaNN1337 commented 4 months ago

Hey

If its possible give IDs to any saved nades that you are able to load the nade faster. It can be annyoing to type: .loadnade B-Smoke-Long-From-RightSide instead of .loadnade 1 (when its the first saved Nade on the server)

Greetings and keep moving :)

shobhit-pathak commented 4 months ago

Hey!

Yes I'll have a rework on grenade system in future. For now, maybe you can use shorter names to save the nades :P

Thanks!

fredmatix commented 3 months ago

Hello Guys

If you change the system to ID based, please make sure that youre always reading the savednades.json first to get the next ID to be written when saving a nade. Other pracc plugins use a ID based system. But i think the IDs are saved in RAM once, and the server keeps on increasing the IDs in RAM while in parallel writing in the file. The problem is, if youre runnig multiple servers which rely on the same json file they will all have different knowledge about the current ID. which leads to nades being overwritten. Your system currently works perfect because its SteamID based. no matter how many servers rely on the same json nades are always being written properly, which is actually really nice atm 😀