[MySQL R41-4] Dynamic Update System -
solstice_ - 17.03.2019
Introduction
Hello, this is a new system which I have been working on for like 30 minutes, I use this on my own upcoming server and I just find it useful. Basically, you are able to add updates and changelog in-game, without having to re-edit the script every time you change your code or a system.
How to use it?
Download or clone the repository on GitHub, and compile the code. There are a few includes you need though.
Commands
There are currently three commands, two admin commands and a player command.
- /addupdate [status] [text] - RCON Admins
- /removeupdate [updateid] - RCON Admins
- /updates - Player Command
Credits
SA-MP team for
a_samp
BlueG / maddinat0r for
a_mysql
Emmet_ for
easyDialog
Zeex for
zcmd
Y_Less / maddinat0r for
sscanf2
Screenshots
Here's a list of screenshots:
https://imgur.com/a/fdIbGIs
Download
GitHub
Pastebin
Enjoy it.
Re: [MySQL R41-4] Dynamic Update System -
Ponga - 17.03.2019
great i really need this. +rep
Re: [MySQL R41-4] Dynamic Update System -
TheToretto - 17.03.2019
That's clever! Good job man. Just a simple notice, dialogs with white font are better than the default color
Re: [MySQL R41-4] Dynamic Update System -
d3Pedro - 17.03.2019
This is hot, but you also have to check if the update list is empty and return by sending the client a message that the update is empty otherwise it'll show a empty dialog.
Re: [MySQL R41-4] Dynamic Update System -
Logic_ - 17.03.2019
Good shit. +4 rep.
Re: [MySQL R41-4] Dynamic Update System -
solstice_ - 17.03.2019
Quote:
Originally Posted by Ponga
great i really need this. +rep
|
Thank you
Quote:
Originally Posted by TheToretto
That's clever! Good job man. Just a simple notice, dialogs with white font are better than the default color
|
Thanks
Quote:
Originally Posted by ConnorW
This is hot, but you also have to check if the update list is empty and return by sending the client a message that the update is empty otherwise it'll show a empty dialog.
|
Have you seen the screenshots? I have already done that,
https://i.imgur.com/nblsJF2.png. Thanks by the way.
Quote:
Originally Posted by Logic_
Good shit. +4 rep.
|
Thank you
.
Re: [MySQL R41-4] Dynamic Update System -
SymonClash - 17.03.2019
Nice job here. Do you think your system can be a good sample to make a vehicle ownership system? Also i see you haven't used any enums, just normal mysql queries.
FYI, i'm referring to something like:
pawn Code:
#define MAX_REPORTS 50
enum rData
{
reportID,
reporterName,
reportedPlayer,
reportedReason
}
new ReportData[MAX_REPORTS][rData];
Re: [MySQL R41-4] Dynamic Update System -
Variable™ - 17.03.2019
Good work
Re: [MySQL R41-4] Dynamic Update System -
liszt - 18.03.2019
Good work, but consider these points:
1) Right now, every time someone types /updates, you perform a query to get all news items.
2) News items are the same for everyone.
3) The only time an "update" of the news items is needed is when a new one is added/removed.
News items are really just formatted strings. You need
one instance of all strings (since they're common to everyone), and my suggestion is to use a
Vector to keep track of all string values.
When someone creates a new entry, you just push back to the vector via
VECTOR_push_back_str.
When someone deletes an entry, you just remove that entry via
VECTOR_remove_str.
When someone enters the /updates command, you can just print a dialog with all the concatenated strings from the news vector.
Edit: When the gamemode first starts, you perform the query and populate the initial vector.
Re: [MySQL R41-4] Dynamic Update System -
Private200 - 19.03.2019
Haven't seen the code, but sounds fair enough for a 30-minute work. Well done.