Hello,

i wanted to ask. I have custom gigafun server and i want do one feature. I need add cooldown condition on command.

For example i have commands .goname (teleprot to player) and i need to do command have 30 min cooldown. So when u use it, u can use it next time after 30 minutes.

Thanks for help.

2 (edited by cyberpro 2018-12-11 23:11:52)

I recommend you to check in your solution for UNSTUCK command because i think it has a cooldown code, so you can use it in your way.

Stuck command cast spell, so spell have cooldown.

Murko wrote:

Stuck command cast spell, so spell have cooldown.


MMMM yea or that, i wasn't sure tongue

in the command itself add an IF statement something like
if(pPlayer->GetName == (sql quarry to a custom table to search for this player))
{
if(result date = current date)
{
if(result time - current time >= 30)
  execute the command
else
  send message for cooldown
}
}
else
{
execute the command
(save player to database that spell is on cooldown)
}

not the perfect way but it will work, you can try editing a already existing spell to fit your needs