3/15/2023 0 Comments Gmod file types![]() ![]() Furthermore, you should not save data during the GM:ShutDown hook, as it may be too late to start saving data as some players will become invalid which means that their precious token count is now lost. Do not wait until the player leaves to save the number of tokens that they have earned whilst playing, as the server may suffer a fatal crash before then. ![]() Therefore, you should deal with the data as quickly as possible to avoid losing it. Unfortunately, Garry's mod servers aren't predictable - they can easily crash without warning or become overloaded. In case you couldn't tell, there is an over-arching theme here: Never trust the client. This is why we must use identification such as Player:SteamID's, since they can never be changed by the client. If we wanted to store a client's health when they log off, and we used their steam names as identification, what's stopping them from changing it before they next log on? Nothing. ![]() Let's say we started letting clients keep track of their money what's stopping them from adding a few zeros on the end?Īlways use identification that the client can't manipulate. ![]() Keep all data backed up on the server as this is the only way that you can be sure that the data is authentic. Never trust data that has been handled by a client. When handling any data, there are some rules that we should follow: In this tutorial, we will go over File Based Storage. There are multiple ways of storing data in Garry's Mod. If you need to give data to the client, make sure to keep a backup of it on the server! Only store, save, change, and load data from the server. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |