Hello, I have this code for automatic change in the database, and if when setting %% CONFIG %% to %% USER %% to add dm, it works perfectly when changing game_disable in the database does not happen Nothing at all, zero information about the error in the file error.log or about the action performed in the database
Automatic shutdown of the game
This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.
-
-
??
I think you can add DM from administrator panel globally -
Yes, I know that in the admin panel I can add dm but i have automatic dm adding for active players right now. Now I want to do so that I will be able to schedule the game to turn off and on automatically
-
You cannot turn your game on and off with that code lol.
Off = UPDATE %%CONFIG%% SET game_disabled = 1;
On = UPDATE %%CONFIG%% SET game_disabled = 0;
An easy Logic would be
if(config::get()>game_disabled == 1){
// turn on
database::get()->update(“UPDATE %%CONFIG%% SET game_disabled = 0;”, []);
} else {
database::get()->update(“UPDATE %%CONFIG%% SET game_disabled = 1;”, []);
}
just set the time where the Cronjob should be called and that’s it. -
I honestly don't understand what you wrote completely. Tell me if this is correct
-
This is really, really wrong. Don’t you want a cronjob to disable and enable the game ?
-
This is how I need cronjob
-
-
This will work even worse as you do not run the database query. I posted a working code 2 posts above so what’s the issue ?
-
Is it ok now or should I write to the file only what you provided and will work?
-
Share
- Facebook 0
- Twitter 0
- Google Plus 0
- Reddit 0
-
Users Online 3
3 Guests
-
Tags