Solved KillStreaks

Discussion in 'Plugin Development' started by ajs333, Dec 13, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    ajs333

    AoH_Ruthless
    Ok, before I use your code I want to make sure I know what it is...
    Line 1) Adds a player to the map if they are not in it already
    Line 2) Just a message to make sure everything is working up to that point
    Line 3) Makes a variable called "kills"
    Line 4) Adds 1 killstreak to the player
    Line 5) Just a message to make sure everything is working up to that point
    Line 6) If a player has a Killstreak of 1
    Line 7) Just a message to make sure everything is working up to that point
    Line 8) (Not here) but here is where I add my code when a player has a KillStreak

    Please tell me if I am correct, if not then I won't use your code.
     
  2. Offline

    AoH_Ruthless

    ajs333
    Yes. I would first test that out to see if it works.
     
  3. Offline

    ajs333

    AoH_Ruthless
    I had to make another EventHandler for when a player dies it removes them from the list and also just a mental note for you, I changed this:
    Code:
                if(!killstreak.containsKey(killer.getName())) killstreak.put(killer.getName(), 0); 
    to
    Code:
                if(!killstreak.containsKey(killer.getName())) killstreak.put(killer.getName(), 1); 
    Because if a player gets a kill then they wouldn't be at 0, they would be at 1.
     
  4. Offline

    AoH_Ruthless

    ajs333
    No, that is wrong. Because no matter what the 1 is added, so first the player is placed at 0 but then immediately placed at 1.
     
  5. Offline

    ajs333

    @AoH_Rutheless
    While testing I found that changing it actually fix the issue which was once they got a kill it never added the kill to the map.
     
  6. Offline

    AoH_Ruthless

    ajs333
    Maybe my freehand code was a little off. Is the issue solved?
     
  7. Offline

    The_Doctor_123

    It better be. 70 posts is insane.
     
  8. Offline

    ajs333

    Yesh, solved
     
Thread Status:
Not open for further replies.

Share This Page