I'm trying to make a custom kick command (.vkick) that vip players can use every 2 hours.
Is what I have and is confusing the hell out of me with all these time factors.
Code:
uint32 Cooldown = 10;
uint32 RemainingTime = Cooldown-time(NULL);
std::string RemainingTimeStr = secsToTimeString(uint32(RemainingTime), true);
std::string CooldownTotalStr = secsToTimeString(Cooldown, true);
if (RemainingTime < 0)
{
RemainingTime = 0;
target->GetSession()->KickPlayer();
}
if (Cooldown - RemainingTime != 0)
{
handler->PSendSysMessage("Kick Command Remaining Cooldown: %s ", RemainingTimeStr.c_str());
}
Is what I have and is confusing the hell out of me with all these time factors.