Thread: Pest Control not giving points to the players

Results 1 to 3 of 3
  1. #1 Pest Control not giving points to the players 
    Registered Member arkanis's Avatar
    Join Date
    Nov 2010
    Posts
    36
    Thanks given
    1
    Thanks received
    0
    Rep Power
    1
    Okay so, players on my server play and win a pc game, they get the "you have won the game and get 4 points" message but the points ain't added to their accounts. Why? This is part of the Pest Control file from my server..


    public void endGame(boolean won) {
    gameTimer = -1;
    waitTimer = WAIT_TIMER;
    for (int j = 0; j < PlayerHandler.players.length; j++) {
    if (PlayerHandler.players[j] != null) {
    if (PlayerHandler.players[j].inPcGame()) {
    Client c = (Client) PlayerHandler.players[j];
    c.getPA().movePlayer(2657, 2639, 0);
    if (won && c.pcDamage > 4) {
    if (c.goodSide == true && c.badSide == false) {
    c.pcPoints += 8;
    c.sendMessage("You have won the pest control game and have been awarded 8 pest control points.");
    } else if (c.goodSide == false && c.badSide == true) {
    c.pcPoints += 4;
    c.sendMessage("You have won the pest control game and have been awarded 4 pest control points."); }
    if(c.pestcontrolgames == 99) {
    c.completedtask += 1;
    c.getPA().sendFrame126("@gre@Pest Control Hero", 35082);
    c.getPA().sendFrame126(""+c.completedtask+" / 32", 35055);
    c.sendMessage("@blu@You have completed a hard achievement, Pest Control Hero.");
    }
    c.pestcontrolgames += 1;
    c.playerLevel[3] = c.getLevelForXP(c.playerXP[3]);
    c.playerLevel[5] = c.getLevelForXP(c.playerXP[5]);
    c.specAmount = 10;
    c.getItems().addItem(995, c.combatLevel * 50);
    c.getPA().refreshSkill(3);
    c.getPA().refreshSkill(5);
    } else if (won) {
    Reply With Quote  
     

  2. #2  
    Registered Member CapitalCoding's Avatar
    Join Date
    Jul 2011
    Posts
    193
    Thanks given
    30
    Thanks received
    25
    Rep Power
    13
    Maybe c.goodSide is false and c.badSide is also false? Try adding
    c.sendMessage("This boolean works.");
    Bellow
    if (won && c.pcDamage > 4) {
    If the message not come, then you should change the statment
    Reply With Quote  
     

  3. #3  
    Registered Member arkanis's Avatar
    Join Date
    Nov 2010
    Posts
    36
    Thanks given
    1
    Thanks received
    0
    Rep Power
    1
    Sorry i don't understand..I'm a basic coder, what should I do again?
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 5
    Last Post: 01-15-2013, 05:12 PM
  2. making the player not run up to the npc?
    By titas lol in forum Help
    Replies: 0
    Last Post: 12-30-2010, 03:17 PM
  3. Replies: 4
    Last Post: 05-24-2010, 05:28 AM
  4. Replies: 0
    Last Post: 03-04-2010, 04:03 AM
  5. Replies: 87
    Last Post: 06-05-2009, 06:49 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •