![]() ![]() When only value is nil, delete key value pair for given section. When both key and value are nil but section is not, delete section. When all three parametes are nil, no action at all. If temp ~= nil and u ~= temp then u = temp end If not file_exists(filename) then return ans end key/value pair table containing the corresponding pairs from the file. Read the whole configuration in a table such that each section is a key to is that work i dont test it Reply Good karma Bad karma 0 votes. You can read/write any such file and add, update, or delete entries depending on which parameters are left nil. and no theres no torrent files this is just old gmod 10 Reply Good karma Bad karma +1 vote. (WARNING: Not tested 100% but seems to work.) Local ply1ct = CurTime() - (SWEP.Here's one possibility. This is how I would imagine reading and getting length of carry time: Initialize hook might or might not be needed, so check that.Īfter all that your table should be pretty much always up to date, so you can read from it however you want, maybe even sort it based on the saved times. I want to import as many of the models I can find into SFM and fix them properly for usage. The vast majority of Danganronpa models have been deleted or are so few and far between you have to comission someone to recreate one. Now, when you need to load the data (on server start, I guess?), you could read that file, convert it into a table with a similar reverse function and set that to your variables in the Lua file. GMod Port-Junko Enoshima (READ DESCRIPTION) This is a port of a Gmod Junko Enoshima model. ![]() I leave this up to you since your question doesn't tell me much. Here you will have to account and update the table / file along with your gamemode events, like dropping the weapon, player dying with the weapon, round ends, or whatever. Now you may or may not, depending on your needs, parse this table to json and save it to a file, those 2 functions are the basic ones you'll need: When doing that you want to save player's ID, preferably Steam64. In the callback you do necessary checks and whatnot, then you store this info in your table: Then you use one of those hooks: I think second one will be better and more reasonable for you to use. If you don't wanna use database and only store the times, why not use tables and if needed, parse them to json and save that file in the garrysmod/data folder.įirst you create a table on the server, doesn't have to be global assuming you're gonna access it's reference only in the same file, either a or a Three main ways you could store that kind of data: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |