Respawn with kit depending on perm

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

pftaaron

Member
Mar 15, 2019
2
0
0
21
I need help with my skript. I'm brand new to skriping and I want to learn more. I've done lots of research but I haven't found too much on permissions. My idea is that when a player respawns, it checks if they have a permission, if they don't, nothing happens. I want it to check for multiple permissions, like ranks. If a player has a rank, it runs a command to console to give them a kit when they respawn. I'm a little stuck here. I know how to read the skript, I'm not a total noob. I don't know how to cancel the "execute console" if the player doesn't have the autokit.member permission... My skript isn't working because even if the player doesn't have the permission "autokit.member", it still runs the console command.

on respawn:
if player has permission "autokit.member":
execute console command "/kit dtools %player%"
 
Try:
code_language.skript:
on respawn:
    if player has permission "autokit.member":
        execute console command "/kit dtools %player%"
    else:
        stop
 
I need help with my skript. I'm brand new to skriping and I want to learn more. I've done lots of research but I haven't found too much on permissions. My idea is that when a player respawns, it checks if they have a permission, if they don't, nothing happens. I want it to check for multiple permissions, like ranks. If a player has a rank, it runs a command to console to give them a kit when they respawn. I'm a little stuck here. I know how to read the skript, I'm not a total noob. I don't know how to cancel the "execute console" if the player doesn't have the autokit.member permission... My skript isn't working because even if the player doesn't have the permission "autokit.member", it still runs the console command.

on respawn:
if player has permission "autokit.member":
execute console command "/kit dtools %player%"
Could you please format your code? (CODE under the + icon or upload to haste/paste-bin)
 
Try:
code_language.skript:
on respawn:
    if player has permission "autokit.member":
        execute console command "/kit dtools %player%"
    else:
        stop
thank you for this, but I think I might have the permissions messed up. Only the pex group member has the autokit.member permission, but everyone else is respawning with their kit.
 
You could also try:
Code:
on respawn:
    if {autokit.%player%} is true:
        execute console command "/kit dtools %player%"
    else:
        stop
        

command /autokit:
 permission: autokit.member
 permission message: You cannot do that
 trigger:
  if {autokit.%player%} is not set:
   set {autokit.%player%} to true
   send "enabled auto-kit!" to player
  
  if {autokit.%player%} is true:
   set {autokit.%player%} to false
   send "disabled auto-kit!" to player
 
 
  if {autokit.%player%} is false:
   set {autokit.%player%} to true
   send "enabled auto-kit!" to player

It works for me (in the paser)
 
Status
Not open for further replies.