Player's level

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

Samaib

Member
Mar 24, 2020
10
0
0
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:
on death:
    damager is in world "KitPvP"
    make console execute command "xp 1 %damager%"
    
on chat:
    player is in world "KitPvP"
    cancel event
    broadcast "%{level::%player%}% %player's display name%: %message%" to the player's world
 
Code:
on death of a player:
    If attacker is a player:
        if victim is  a player:
           if attacker is in world "KitPvP":
               add 1 to attacker's xp
on chat:
    player's world is "KitPvP":
        cancel event
        loop all players in world "KitPvP":
            send "%player's xp% %player's display name%&r: %message%" to loop-player
 
Status
Not open for further replies.