Get Backers Posted December 7, 2020 Posted December 7, 2020 (edited) Good evening! anyone how to put a delay in 3 minutes before use request commands! ACMD_FUNC(request) { if (!message || !*message) { clif_displaymessage(sd->fd,msg_txt(sd,277)); // Usage: @request <petition/message to online GMs>. return -1; } sprintf(atcmd_output, msg_txt(sd,278), message); // (@request): %s intif_wis_message_to_gm(sd->status.name, PC_PERM_RECEIVE_REQUESTS, atcmd_output); clif_messagecolor(&sd->bl, color_table[COLOR_LIGHT_GREEN], atcmd_output, false, SELF); clif_displaymessage(sd->fd,msg_txt(sd,279)); // @request sent. return 0; } Edited December 7, 2020 by Get Backers Quote
0 EveeX Posted December 11, 2020 Posted December 11, 2020 ACMD_FUNC(request) { if (!message || !*message) { clif_displaymessage(sd->fd,msg_txt(sd,277)); // Usage: @request <petition/message to online GMs>. return -1; } if (DIFF_TICK(sd->refreshdelay_tick, gettick()) > 0) return 0; sprintf(atcmd_output, msg_txt(sd,278), message); // (@request): %s intif_wis_message_to_gm(sd->status.name, PC_PERM_RECEIVE_REQUESTS, atcmd_output); clif_messagecolor(&sd->bl, color_table[COLOR_LIGHT_GREEN], atcmd_output, false, SELF); clif_displaymessage(sd->fd,msg_txt(sd,279)); // @request sent. sd->refreshdelay_tick= gettick() + n; // <-- n = time in miliseconds return 0; } Try this Quote
0 Get Backers Posted December 11, 2020 Author Posted December 11, 2020 Hi sir got error 1> atcommand.cpp(8809,9): error C2039: 'refreshdelay_tick': is not a member of 'map_session_data' src\map\trade.hpp(7): message : see declaration of 'map_session_data' rc\map\atcommand.cpp(8816,9): error C2039: 'refreshdelay_tick': is not a member of Quote
0 Royr Posted December 11, 2020 Posted December 11, 2020 4 hours ago, Get Backers said: Hi sir got error 1> atcommand.cpp(8809,9): error C2039: 'refreshdelay_tick': is not a member of 'map_session_data' src\map\trade.hpp(7): message : see declaration of 'map_session_data' rc\map\atcommand.cpp(8816,9): error C2039: 'refreshdelay_tick': is not a member of Which means you must define the missing part of refreshdelay_tick. Anyways try this one: usedelay_tick.diffNote: If you know how to use this you can use this in any commands to give them delay of using. 1 Quote
0 Get Backers Posted December 11, 2020 Author Posted December 11, 2020 (edited) Wow its working now thanks bro! i have last question how change display the seconds to minutes Edited December 11, 2020 by Get Backers Quote
Question
Get Backers
Good evening! anyone how to put a delay in 3 minutes before use request commands!
ACMD_FUNC(request)
{
if (!message || !*message) {
clif_displaymessage(sd->fd,msg_txt(sd,277)); // Usage: @request <petition/message to online GMs>.
return -1;
}
sprintf(atcmd_output, msg_txt(sd,278), message); // (@request): %s
Edited by Get Backersintif_wis_message_to_gm(sd->status.name, PC_PERM_RECEIVE_REQUESTS, atcmd_output);
clif_messagecolor(&sd->bl, color_table[COLOR_LIGHT_GREEN], atcmd_output, false, SELF);
clif_displaymessage(sd->fd,msg_txt(sd,279)); // @request sent.
return 0;
}
4 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.