Skript Help

  • 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 community!

    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.

oskarst2001

Member
Mar 12, 2017
2
0
0
Skript Version: 1.8
Skript Author: Bensku'
Minecraft Version: dev 25
---
Full Code:
Note: If the code is too large, feel free to use a pasting website (Pastebin or hastebin)
Note: If a variable is being set in another script, but not shown, please explain how they are being set


code_language.skript:
on right click holding a rose red:
    make the command sender execute "/spawn"
    make the command sender execute "/sv off"
    remove rose red from player
    make the command sender execute "/kit hotbar"
 
command /spectate <player>:
    usage: &c/spectate <player>
    aliases: /spec
    executable by: players
    trigger:
        make the command sender execute "/ci"
        teleport player to arg 1
        give a rose red of unbreaking 1 named "§cback to spawn" to the player
        make the command sender execute "/sv on"

Errors on Reload:

code_language.skript:
No errors/CODE]

[B]Console Errors:[/B] [I](if applicable)[/I]

[CODE=SKRIPT]No errors/CODE]

[I]Its a spectator script:[/I]

[B]Addons using (including versions):[/B]
No addons

[B]:[/B]

[B]Have you tried searching the docs?[/B] Yes
[B]Have you tried searching the forums?[/B] Yes

I'm trying to create a spectator script and I don't know if there is a way to do that the command sender cannot do the command on himself, the command is /spec <player> it should teleport you to the player, also can I make that I can spectate the player only if he is in a specific world?
 
@oskarst2001 In this way only the console will be able to execute this command and only if the target player is in a specific world.
code_language.skript:
command /spect [<player>] [<player>]:
    executable by: console
    trigger:
        if arg-2 is in world "world":
            teleport arg-1 to arg-2
#other stuff
You can use that for trigger the command
code_language.skript:
make console execute command "Here the spect command"
 
@oskarst2001 In this way only the console will be able to execute this command and only if the target player is in a specific world.
code_language.skript:
command /spect [<player>] [<player>]:
    executable by: console
    trigger:
        if arg-2 is in world "world":
            teleport arg-1 to arg-2
#other stuff
You can use that for trigger the command
code_language.skript:
make console execute command "Here the spect command"

So the players can't do the command?
[doublepost=1489367261,1489365347][/doublepost]I get 16 errors. what I did wrong?
 

Attachments

  • ‏‏לכידה.PNG
    ‏‏לכידה.PNG
    32.1 KB · Views: 322
Status
Not open for further replies.