1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Player's level

Discussion in 'Skript' started by Samaib, Mar 24, 2020 at 7:33 PM.

  1. Samaib

    Samaib Member

    Joined:
    Tuesday
    Messages:
    3
    Likes Received:
    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 (Text):
    1. on death:
    2.     damager is in world "KitPvP"
    3.     make console execute command "xp 1 %damager%"
    4.    
    5. on chat:
    6.     player is in world "KitPvP"
    7.     cancel event
    8.     broadcast "%{level::%player%}% %player's display name%: %message%" to the player's world
     
  2. Dave

    Dave Well-Known Member

    Joined:
    Jul 20, 2018
    Messages:
    64
    Likes Received:
    0
    Code (Text):
    1. on death of a player:
    2.     If attacker is a player:
    3.         if victim is  a player:
    4.            if attacker is in world "KitPvP":
    5.                add 1 to attacker's xp
    6. on chat:
    7.     player's world is "KitPvP":
    8.         cancel event
    9.         loop all players in world "KitPvP":
    10.             send "%player's xp% %player's display name%&r: %message%" to loop-player
     
  3. Samaib

    Samaib Member

    Joined:
    Tuesday
    Messages:
    3
    Likes Received:
    0
  4. Dave

    Dave Well-Known Member

    Joined:
    Jul 20, 2018
    Messages:
    64
    Likes Received:
    0
    You're welcome.
    --- Double Post Merged, Mar 27, 2020 at 3:01 AM, Original Post Date: Mar 27, 2020 at 3:01 AM ---
    You're welcome.
     
Loading...