Thread: [PI/DSPK] Interface always showing again!

Results 1 to 5 of 5
  1. #1 [PI/DSPK] Interface always showing again! 
    Registered Member Gretar's Avatar
    Join Date
    Sep 2011
    Posts
    289
    Thanks given
    69
    Thanks received
    12
    Rep Power
    7
    So this is how it works. When they click Accept c.Noclip = 1; but then again when they logout and log back in the interface will show up again!!

    Client.java
    under the welcome message i have this!
    Code:
    if(Noclip == 0) {
    getPA().showInterface(19050);
    }
    else {
    getPA().showInterface(16200);
    }
    This is a Rule interface with Accept & Decline buttons!

    ClickingButtons.java
    Code:
    	case 74108://Accept
    		{
    		c.getPA().closeAllWindows();
    		c.sendMessage("@red@Thank you for Accepting these rules :) If you do not follow them you will get banned");
    		c.Noclip = 1;
    		break;
    		}
    		case 74112://Decline
    		c.logout();
    		break;

    Playersave.java
    Code:
    characterfile.write("NOC = ", 0, 6);
    			characterfile.write(Integer.toString(p.Noclip), 0, Integer.toString(p.Noclip).length());
    			characterfile.newLine();
    &&
    } else if(token.equals("Noclip")) {
    p.Noclip = Integer.parseInt(token2);
    Owner of Roat Pkz
    Reply With Quote  
     

  2. #2  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    If i'm not mistakened your naming isn't corred it should be;

    Code:
    } else if(token.equals("NOC")) {
    p.Noclip = Integer.parseInt(token2);
    Reply With Quote  
     

  3. #3  
    Banned
    Join Date
    Dec 2011
    Posts
    72
    Thanks given
    63
    Thanks received
    99
    Rep Power
    0
    Quote Originally Posted by Gohan View Post
    If i'm not mistakened your naming isn't corred it should be;

    Code:
    } else if(token.equals("NOC")) {
    p.Noclip = Integer.parseInt(token2);
    This^
    Reply With Quote  
     

  4. #4  
    Extreme Donator

    Jilic-Matt's Avatar
    Join Date
    May 2011
    Age
    29
    Posts
    1,612
    Thanks given
    799
    Thanks received
    494
    Rep Power
    540
    Quote Originally Posted by Gohan View Post
    If i'm not mistakened your naming isn't corred it should be;

    Code:
    } else if(token.equals("NOC")) {
    p.Noclip = Integer.parseInt(token2);
    no because the token is Noclip, the reason it says NOC in the write characterfile is irelevant all that is doin is writing a little bitof text (e.g a label) its not referencing anything
    sory if i explained tht badly but yeh what the guy initialy wrote is right. pointless to change the name but right...
    Reply With Quote  
     

  5. #5  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    Quote Originally Posted by Jilic-Matt View Post
    no because the token is Noclip, the reason it says NOC in the write characterfile is irelevant all that is doin is writing a little bitof text (e.g a label) its not referencing anything
    sory if i explained tht badly but yeh what the guy initialy wrote is right. pointless to change the name but right...
    Im pretty sure if it's reading it as a property then that could be the problem with it not saving. Is it saving? Make sure your switch statements are opening the correct interfaces.
    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. Showing Interface
    By Jaegon in forum Help
    Replies: 2
    Last Post: 11-09-2011, 06:06 AM
  2. [pi/dspk] whip showing on head under helmet
    By Jilic-Matt in forum Help
    Replies: 11
    Last Post: 08-05-2011, 03:32 PM
  3. Showing an NPC on an Interface [PI Help]
    By Xynasty in forum Help
    Replies: 2
    Last Post: 06-27-2011, 12:39 AM
  4. Replies: 5
    Last Post: 03-27-2011, 01:29 AM
  5. 554 interface showing
    By Leanbow in forum Snippets
    Replies: 6
    Last Post: 09-01-2009, 07:20 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •