Thread: donor portal.

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 donor portal. 
    GANGNAM STYLE!

    Ohad's Avatar
    Join Date
    Aug 2011
    Posts
    3,179
    Thanks given
    152
    Thanks received
    352
    Rep Power
    1671
    i added a portal and want it to be donators only what i do
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Aug 2011
    Posts
    2,760
    Thanks given
    297
    Thanks received
    534
    Rep Power
    1596
    add a if statement
    Code:
    if (c.playerrights !=4)
    c.sendMessage("only donators can enter this portal");
    Quote Originally Posted by Aj View Post
    This is not even a tutorial. It's fail for rep. It's fail for life.
    Reply With Quote  
     

  3. #3  
    My TFLOP is better than yours
    Sonic chao's Avatar
    Join Date
    Aug 2011
    Posts
    298
    Thanks given
    51
    Thanks received
    13
    Rep Power
    24
    Quote Originally Posted by spikeyyy View Post
    add a if statement
    Code:
    if (c.playerrights !=4)
    c.sendMessage("only donators can enter this portal");
    Yes, but remember to capitalize some letters.
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Oct 2011
    Age
    27
    Posts
    68
    Thanks given
    8
    Thanks received
    14
    Rep Power
    0
    Any did you make a case in actionhandler.java?
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Aug 2011
    Posts
    2,760
    Thanks given
    297
    Thanks received
    534
    Rep Power
    1596
    Quote Originally Posted by Sonic chao View Post
    Yes, but remember to capitalize some letters.
    just wrote it quickly
    Quote Originally Posted by Aj View Post
    This is not even a tutorial. It's fail for rep. It's fail for life.
    Reply With Quote  
     

  6. #6  
    Banned
    Join Date
    Sep 2010
    Posts
    224
    Thanks given
    15
    Thanks received
    14
    Rep Power
    0
    Just add a restriction on its case in ActionHandler like
    Code:
    if (!c.isDonator = 1) 
    c.sendMessage("You need to be a donator to enter this portal.");
    else 
    <tele method here>
    Reply With Quote  
     

  7. #7  
    GANGNAM STYLE!

    Ohad's Avatar
    Join Date
    Aug 2011
    Posts
    3,179
    Thanks given
    152
    Thanks received
    352
    Rep Power
    1671
    Quote Originally Posted by Sagi View Post
    Just add a restriction on its case in ActionHandler like
    Code:
    if (!c.isDonator = 1) 
    c.sendMessage("You need to be a donator to enter this portal.");
    else 
    <tele method here>
    i already added the portal how i write the tele method
    Reply With Quote  
     

  8. #8  
    My TFLOP is better than yours
    Sonic chao's Avatar
    Join Date
    Aug 2011
    Posts
    298
    Thanks given
    51
    Thanks received
    13
    Rep Power
    24
    Like this:

    Code:
    if (!c.isDonator = 1) {
    c.sendMessage("You need to be a donator to enter this portal.");
    return;
    } else {
    c.getPA().startTeleport(xcoord, ycoord, height, "modern"); // Teleports him.
    c.sendMessage("Welcome to donator zone!"); // I don't know the name of your place, so I just named it Donator zone. Yea.
    }
    Reply With Quote  
     

  9. #9  
    GANGNAM STYLE!

    Ohad's Avatar
    Join Date
    Aug 2011
    Posts
    3,179
    Thanks given
    152
    Thanks received
    352
    Rep Power
    1671
    should i do it like this?

    case....
    if (!c.isDonator = 1) {
    c.sendMessage("You need to be a donator to enter this portal.");
    return;
    } else {
    c.getPA().startTeleport(xcoord, ycoord, height, "modern"); // Teleports him.
    c.sendMessage("Welcome to donator zone!"); // I don't know the name of your place, so I just named it Donator zone. Yea.
    }


    were in their do i write the case
    Reply With Quote  
     

  10. #10  
    I'm President Carter


    Join Date
    Jan 2011
    Posts
    1,204
    Thanks given
    17
    Thanks received
    222
    Rep Power
    144
    Quote Originally Posted by Sonic chao View Post
    Like this:

    Code:
    if (!c.isDonator = 1) {
    c.sendMessage("You need to be a donator to enter this portal.");
    return;
    } else {
    c.getPA().startTeleport(xcoord, ycoord, height, "modern"); // Teleports him.
    c.sendMessage("Welcome to donator zone!"); // I don't know the name of your place, so I just named it Donator zone. Yea.
    }
    2 Things:

    1) Learn to use conventions please
    2) You don't need the return statment if you are doing an if else.

    Code:
    		case ####:
    			if (c.isDonator < 1) {
    				c.sendMessage("You need to be a donator to enter this portal.");
    			} else {
    				c.getPA().startTeleport(xcoord, ycoord, height, "modern");
    				c.sendMessage("Welcome to donator zone!");
    			}
    		break;


    Reply With Quote  
     

  11. Thankful users:


Page 1 of 2 12 LastLast

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. hello im a donor
    By nazal12 in forum The Red Carpet
    Replies: 5
    Last Post: 11-14-2010, 10:36 PM
  2. Donor Status+Donor Items
    By Hyperventilate in forum Help
    Replies: 0
    Last Post: 03-27-2009, 04:55 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
  •