09.05.2018, 21:52
You can't load the messages to put in a define.
#define is a precompiler instruction and is used to replace text in the script upon compiling.
This happens before your script is even executed, and at that point, there is no connection to any database yet.
After compiling, the #define isn't in the amx file.
But you can do it as Gammix told you: use arrays.
Why would you even use defines to hold messages?
A define is static and cannot be changed during runtime.
Using arrays, you can allow the messages to be added/edited/removed from the database and script during runtime.
They're just more flexible and can be expanded easily.
In Gammix's code, you simply need to modify the MAX_MESSAGES define to allow more messages to be held in memory by your script/server.
#define is a precompiler instruction and is used to replace text in the script upon compiling.
This happens before your script is even executed, and at that point, there is no connection to any database yet.
After compiling, the #define isn't in the amx file.
But you can do it as Gammix told you: use arrays.
Why would you even use defines to hold messages?
A define is static and cannot be changed during runtime.
Using arrays, you can allow the messages to be added/edited/removed from the database and script during runtime.
They're just more flexible and can be expanded easily.
In Gammix's code, you simply need to modify the MAX_MESSAGES define to allow more messages to be held in memory by your script/server.