Posts: 871
Threads: 114
Joined: May 2014
Hello i want to create and command to block other commands
I want it example : /blockcmd [command name]
and when the other people try the commands blocked
Thank you
Posts: 871
Threads: 114
Joined: May 2014
Hmm what about the MySQL
If i register in it and Can be changed IN GAme ?
How to use it ? with #define ?
Posts: 362
Threads: 46
Joined: Jul 2013
Reputation:
0
What MySQL? I don't really understand what you are trying to do.
Posts: 871
Threads: 114
Joined: May 2014
More of times i saw when login in any gamemode
I found example: #define Ban 1
And ban command is enable / disable
Posts: 362
Threads: 46
Joined: Jul 2013
Reputation:
0
If you use #define it won't be dynamic anymore. Which means you will only be able to black and unblock commands after changing that in the script and restarting the server. Just use variables instead. And if you mean that you want to keep that command blocked even after the server restarts, just save it like you save any other player stats. If you are using MySQL, create a table called cmds for example and for the structure add all the commands you want.
Posts: 871
Threads: 114
Joined: May 2014
Quote:
Originally Posted by mirou123
If you use #define it won't be dynamic anymore. Which means you will only be able to black and unblock commands after changing that in the script and restarting the server. Just use variables instead. And if you mean that you want to keep that command blocked even after the server restarts, just save it like you save any other player stats. If you are using MySQL, create a table called cmds for example and for the structure add all the commands you want.
|
Soo if i create the commands
It mut bee variable for all commands
EXP: BlockStats
Posts: 362
Threads: 46
Joined: Jul 2013
Reputation:
0
Yeah one variable for each command. You can also make an array but you have to remember Which command has which index.
For example: new CMDs[3];
0 would be for /ban
1 would be for /kick
2 for /jail etc...
That will block that command for everyone though not just one player.
Posts: 871
Threads: 114
Joined: May 2014
I want it to be saved and after restart server