• A mailing system
    8 replies, posted
Could anyone make one or help me to get started with one?
What would you like it to do? Just sending text from one player to another?
Look into Derma and the Net Library - if you become familiar how those two things work, you should be able to sit down and spend five minutes breaking your objective down into smaller sections Some advice to get you started - loop through players and make a derma button for each, assign them to a variable when you click it and use that variable to track who is getting the message. Using the Net Library, write the message as a string and receiver as an entity - then send it to them in the Net.Receive serverside code
[QUOTE=smithy285;49208776]What would you like it to do? Just sending text from one player to another?[/QUOTE] Like so you can send mail to people who are offline and when they log on the server they can read the message
[QUOTE=keeperman;49208970]Like so you can send mail to people who are offline and when they log on the server they can read the message[/QUOTE] Then pretty much what Niandra said for sending. You should store the messages in a database so they are not lost when the server restarts. For simplicity use the SQL Library that comes with Garry's Mod: [url]http://wiki.garrysmod.com/page/Category:sql[/url] Store the messages along with the 64-bit SteamID of the person they are for, then when that player joins check the database for any messages that are for them.
[QUOTE=smithy285;49208988]Then pretty much what Niandra said for sending. You should store the messages in a database so they are not lost when the server restarts. For simplicity use the SQL Library that comes with Garry's Mod: [url]http://wiki.garrysmod.com/page/Category:sql[/url] Store the messages along with the 64-bit SteamID of the person they are for, then when that player joins check the database for any messages that are for them.[/QUOTE] Sorry if this is a stupid-ass question, but does SQL work offline? I tried to use it once but it didn't exactly work
If you're running your sql server locally, you won't need an internet connection (Anyway, you'll need to setup it as 127.0.0.1)
[QUOTE=MPan1;49213145]Sorry if this is a stupid-ass question, but does SQL work offline? I tried to use it once but it didn't exactly work[/QUOTE] Using the functions I linked OP to ( [url]http://wiki.garrysmod.com/page/Category:sql[/url] ) requires no internet as the database is stored locally on the client or server.
I think one was released on the ULX website ( from a user ) You might want to check there I don't know if it's kept up to date
Sorry, you need to Log In to post a reply to this thread.