If %Variable% is "Something"?

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

raupauk

Member
Jan 29, 2025
3
2
3
Greetings!
So I got the Plugin "BetterTeams" and I wanted to create a command that only a specific team is allowed to use. Since they do not have any type of permission-by-team system, I thought about doing it with Skript, but somehow it always tells me that I have no permission, even when I am on the "TDU" Team. Does anyone knows why?


Code:
command /recruit <player>:
    trigger:
        if {betterteams_name::%player%} is "TDU":
            execute console command "teamadmin join %arg-1% RECRUIT"
            teleport arg-1 to location at -213, -2, -43 in world("world")
            send "&a%arg-1% has been added as Recruit!" to player
            send "&aYou have been recruited!" to arg-1
        else:
            send "&cNo permission!" to player
 
Code:
import:
    com.booksaw.betterTeams.Team


command /recruit:
    trigger:
        set {_p} to player parsed as a offline player
        if Team.getTeam({_p}).getName() is "TDU":
            execute console command "teamadmin join %arg-1% RECRUIT"
            teleport arg-1 to location at -213, -2, -43 in world("world")
            send "&a%arg-1% has been added as Recruit!" to player
            send "&aYou have been recruited!" to arg-1
        else:
            send "&cNo permission!" to player

Try this. If it doesn't work, you can add me on discord: 0mustafa.
 
  • Like
Reactions: raupauk