Player's xp level Skript

Discussion in 'Skript' started by Samaib, Mar 24, 2020.

  1. I am trying to make a leveling system for KitPvP based off of the players xp bar level, but for some reason when I type in chat, it says "<none>" instead of my level.

    Code (Text):
    on death:
        damager is in world "KitPvP"
        make console execute command "xp 1 %damager%"
       
    on chat:
        player is in world "KitPvP"
        cancel event
        broadcast "&7[%{level::%player%}%] %player's display name%: %message%" to the player's world
     
  2. use
    Code (Text):
    %{level::%player%} ? 0%
    to default to 0 when the player hasn't leveled up