Specator On Join

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

Bendik0208

Member
Jul 26, 2017
16
0
0
24
Can someone fix my error? I don't know how to do it..

This skript will change the gamemode to the player to speactor if you don't have the permission

code_language.skript:
on join:
    if player has permission "No.Spec"
    event stop
    set gamemode of player to spectator
 
You should do it like that:
code_language.skript:
on join:
    if event-player have the permission "no.spec":
        stop
    else:
        set event-player's gamemode to spectator

Remember that you need a permissions plugin like PermissionsEX or zPermissions.
 
Server; 1.8.8
Skript: 2.1.2

But I found on google that I can use
code_language.skript:
Execute console command "/gamemode 3 %player%"
 
Status
Not open for further replies.