Choose Random player to tip

  • 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.

iOranged

Member
Aug 8, 2020
2
0
1
24
hello, i need help.

im making a autotip system on skript but i have a error.

upload_2020-8-8_2-7-15.png
upload_2020-8-8_2-7-55.png


This is the code:


Code:
#==============================[AutoTIP]==============================#
command /tipauto [<player>]:
    permission: {@rankmvp+}
    trigger:
    
        set {_p} to random element of all players in arg-1
        
        if arg-1 is not set:
            make console execute command "sw give coins %arg-1% 100"
            send "&aUn Jugador te ha dado propina y has recibido 100 coins en skywars." to arg-1
            send "&aHas dado propina a %arg-1% en Skywars y has recibido 100 coins." to player
        if arg-1 is set:
            make console execute command "sw give coins %arg-1% 100"
            send "&aUn Jugador te ha dado propina y has recibido 100 coins en skywars." to arg-1
            send "&aHas dado propina a %arg-1% en Skywars y has recibido 100 coins." to player
every 30 seconds:
    loop all players:
        execute loop-player command "/tipauto"
 
Code:
command /tipauto [<player>]:
    permission: {@rankmvp+}
    trigger:
        if arg-1 is not set:
            make console execute command "sw give coins %executor% 100"
            send "&aUn Jugador te ha dado propina y has recibido 100 coins en skywars." to arg-1
            send "&aHas dado propina a %arg-1% en Skywars y has recibido 100 coins." to player
every 30 seconds:
    loop all players:
        execute loop-player command "/tipauto"
 
Status
Not open for further replies.