Jump to content

Is there a way to read an argument


Nd_
 Share

Recommended Posts

For example

command /server <text>:
    description: Go To a server
    permission: changeservers
    executable by: players
    trigger:  
        if args1 equals Lobby
        execute console command "/mv tp %player% ul_Lobby"

Thanks

Edited by Nd_
Changed the on command to command
Link to comment
Share on other sites

18 hours ago, MrScopes said:

if arg 1 is "lobby"

It gives me this error message

image.png.e8329c09a4a54b9446f45e233464dde1.png

Code:

command /server <text>:
    description: Go To a server
    permission: changeservers
    executable by: players
    trigger:  
        if arg 1 is "Lobby"
        execute console command "/mv tp %player% ul_Lobby"
        else if arg 1 is "KitPVP"
        execute console command "/mv tp %player% ul_KitPVP"
        else
        message "There is no world named arg 1"

 

Link to comment
Share on other sites

you need to indent

command /server <text>:
    description: Go To a server
    permission: changeservers
    executable by: players
    trigger:  
        if arg 1 is "Lobby":
            execute console command "/mv tp %player% ul_Lobby"
        else if arg 1 is "KitPVP":
            execute console command "/mv tp %player% ul_KitPVP"
        else:
            message "There is no world named arg 1"

Discord: MrScopes#5548

Link to comment
Share on other sites

  • AdjelG locked this topic
Guest
This topic is now closed to further replies.
 Share



×
×
  • Create New...