Hello i want to ask if how to add timer on @pk command if you are offline the timer will stop, and it will continue once you online, i want to put 60mins timer once the timer runount the @pk command turn to state.pk_mode = 0
int atcommand_pkmode( const int fd, struct map_session_data *sd, const char *command, const char *message ) {
nullpo_retr(-1, sd);
if (!sd->state.pk_mode) {
sd->state.pk_mode = 1;
clif_displaymessage(sd->fd, "You are now no longer in PK mode.");
} else {
sd->state.pk_mode = 0;
clif_displaymessage(sd->fd, "Returned to normal state.");
}
return 0;
}
Question
Jayz
Hello i want to ask if how to add timer on @pk command if you are offline the timer will stop, and it will continue once you online, i want to put 60mins timer once the timer runount the @pk command turn to state.pk_mode = 0
int atcommand_pkmode( const int fd, struct map_session_data *sd, const char *command, const char *message ) { nullpo_retr(-1, sd); if (!sd->state.pk_mode) { sd->state.pk_mode = 1; clif_displaymessage(sd->fd, "You are now no longer in PK mode."); } else { sd->state.pk_mode = 0; clif_displaymessage(sd->fd, "Returned to normal state."); } return 0; }
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.