Help me to create a kit with time of use

I’m trying to create a kit
But allow player to use the kit every 1 hour
But I can’t
Anyone who can help me with that pls

kits

load %kit1%
let %kit1%[] = %p%
save %kit1%
let %time%[%p%] = 60
sleep 1
let %time%[%p%] = %time%[%p%] - 1
if %time%[%p%] = 0 then let %kit1% - %p%
if %p% notin %kit1% then goto 10
if %p% in %kit1% then exit
let %items% = array(298, 299, 300, 301, 273, 274, 275, 291)
/give %p% %items%

I’m pretty sure there’s a tutorial somewhere about kits with time somewhere.

Hello Fello Earthlings 😁 Have a wonderful day

This would continue the timer even if you restart your server! @ALEXMINER1 your’s should work but if you restart your server the timer stops and the player can use instantly the kit again. This is a may better methode:

1. load %kt%
2. let %timer% = 0
3. if varset(%kr%[%p%]) then let %timer% = %kr%[%p%]
4. if %timer% > %kt% + 60 then goto 7
5. message %p% You need to wait at least 60 seconds between kit-uses!
6. exit
7. let %kt%[%p%] = %time%
8. save %kt%
9. ascon /kitgive %p% Test
10. message %p% Equiped with Kit Test! You can use it again 60 seconds!

Melon


prison.krapcon.net: 25559

May help me to win this contest as MadCommands developer :)
http://leetforum.cc/topic/29010/great-30-000-credits-madcommands-minigame-contest/6

@alexminer1 I think the problem is the + 60

Hello Fello Earthlings 😁 Have a wonderful day

@alexminer1 said in Help me to create a kit with time of use:

@melonenbubi
Look
alt text
Any idea what’s the problem

Sorry, my misstake: edit line 4:

if %time% > %timer% + 60 then goto 7


prison.krapcon.net: 25559

May help me to win this contest as MadCommands developer :)
http://leetforum.cc/topic/29010/great-30-000-credits-madcommands-minigame-contest/6

Log in to reply

Looks like your connection to LEET Forums was lost, please wait while we try to reconnect.