OnInit: bindatcmd("dailyreward",strnpcinfo(0)+"::OnAtCmd"); end;
OnAtCmd:
if (#dailyreward > gettimetick(2)) {
message strcharinfo(0),"You must wait 24 hours before receiving more items.";
end;
}
// getitem x,y;
set #dailyreward, gettimetick(2)+86400;
end;
It uses 24 hours cooldown for the daily reward. How to set it to check the date? example. If today is tuesday and he claims the reward, when the server date changes to wednesday, he can already get the reward. As long as you can use the command once per day..
How to do activate this command once per day only? Not via 24 hours cooldown.
Question
Meister
I have currently this code..
It uses 24 hours cooldown for the daily reward. How to set it to check the date? example. If today is tuesday and he claims the reward, when the server date changes to wednesday, he can already get the reward. As long as you can use the command once per day..
How to do activate this command once per day only? Not via 24 hours cooldown.
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.