Get Backers Posted December 7, 2020 Group: Members Topic Count: 26 Topics Per Day: 0.02 Content Count: 70 Reputation: 0 Joined: 11/23/20 Last Seen: January 24, 2021 Share 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 Link to comment Share on other sites More sharing options...
0 EveeX Posted December 11, 2020 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 32 Reputation: 29 Joined: 09/16/20 Last Seen: December 21, 2022 Share 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 Link to comment Share on other sites More sharing options...
0 Get Backers Posted December 11, 2020 Group: Members Topic Count: 26 Topics Per Day: 0.02 Content Count: 70 Reputation: 0 Joined: 11/23/20 Last Seen: January 24, 2021 Author Share 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 Link to comment Share on other sites More sharing options...
0 Royr Posted December 11, 2020 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 90 Reputation: 34 Joined: 10/01/18 Last Seen: January 9, 2023 Share 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 Link to comment Share on other sites More sharing options...
0 Get Backers Posted December 11, 2020 Group: Members Topic Count: 26 Topics Per Day: 0.02 Content Count: 70 Reputation: 0 Joined: 11/23/20 Last Seen: January 24, 2021 Author Share 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 Link to comment Share on other sites More sharing options...
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;
}
Link to comment
Share on other sites
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.