Hello, I have been trying to understand how I can set up a config system for my loadout addon.
What I am trying to do is, have a list of weapons in a config file, with a custom name and corresponding entity name.
And also a custom loadout file for each player that changes his loadout.
I’ve set up in my mind that every weapon has 3 entries:
1 - Unique ID
2 - Name (string)
3 - Entity Name (ex: weapon_smg1)
and every player in their file has the three weapons of different category (1 primary, 1 secondary, 1 special), so the player file would include 3 IDs which are then used by a spawn handler to give out to the player on respawn.
and my handler would check in with the weapons config, find what the entity names of weapon 1, 5 and 7 are and give them to the player.
I already have a user interface for weapon selection, that uses 3 different "DListView"s for each catagory, but I dont know how to set up the DListView items to be automatically generated by reading the server’s config file.
So the things I need help with are:
1 - How to write and read a custom config file.
2 - How to fill in a DListView with items from a custom config file from the server.