25.10.2018, 21:28
(
Последний раз редактировалось AmirSavand; 19.11.2018 в 15:10.
)
First, you need the list of available skins in a table.
Then you will make another table to reference players and their skins (player: 1, skin: 1 (which means, player 1 owns the skin 1 (id in database)))
Then if a player wants to spawn with a class, you'd simply check if player owns it buy hitting database (or store all skins in an array when user connects)
This system can be used for almost anything that players can own (weapon, houses, businesses, vehicles, skins, items, etc...)
Then you will make another table to reference players and their skins (player: 1, skin: 1 (which means, player 1 owns the skin 1 (id in database)))
Then if a player wants to spawn with a class, you'd simply check if player owns it buy hitting database (or store all skins in an array when user connects)
This system can be used for almost anything that players can own (weapon, houses, businesses, vehicles, skins, items, etc...)