Solved Help with a Skript

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Leonardo_

Member
Sep 21, 2020
18
0
1
24
Hello, I would need a hand with this skript. Hello, I would need a hand with this skript. I would like to make sure that typing /tnt give (quantity) is givved that number of tnt. I would like to make sure that typing /tnt give (quantity) is givved that number of tnt. The problem is that %arg-1% associates it with tnt, trying to givve a %arg-1%_tnt instead of tot tnt (I don't know if I explain)


Code:
on first join:
    make console execute command "pex user %player% add utente.registrato"   
on place:
    if event-block is tnt:
        if player is holding tnt named "&c&lTNT":
            set block at event-block to air
            spawn primed tnt at event-block
            
command /tnt give [<integer>]:
    permission: addon.give.tnt
    permission message: &cNon hai il permesso per eseguire questo comando!
    trigger:
        if arg-1 is integer:
            give player %arg-1% tnt named "&c&lTNT"
        else:
            message "&c&lTNT &7(Addon) &8&l> &7 /tnt give <quantità>"
 
Make sure you are using the latest version of Skript and change the command part:

*amount message for testing purposes only. change or remove*

Code:
command /tnt give [<integer>]:
    trigger:
        if arg 1 is integer:
            set {_amount} to arg 1
            give player arg 1 of tnt named "Test"
            message "%{_amount}%"
        else:
            message "Try using a number"
 
Status
Not open for further replies.