Thread: Convert A Code?

Results 1 to 10 of 10
  1. #1 Convert A Code? 
    Registered Member

    Join Date
    Oct 2009
    Age
    27
    Posts
    1,037
    Thanks given
    4
    Thanks received
    8
    Rep Power
    338
    Still Lets You Trade?

    Someone jus edit my code.... pissin me off

    public void tradeReq(int id) {
    if (!server.trading) {
    sM("Trading has been temporarily disabled");
    return;
    }
    client other = (client) handler.players[id];
    if (validClient(trade_reqId)) {
    if (other.inTrade) {
    sM("Other player is busy at the moment.");
    trade_reqId = 0;
    return;
    }
    }
    if(other.interfaceOpened){
    int EnemyX = PlayerHandler.players[trade_reqId].absX;
    int EnemyY = PlayerHandler.players[trade_reqId].absY;
    TurnPlayerTo(EnemyX, EnemyY);
    sM("Other player is busy at the moment.");
    return;
    }
    if(froze)
    return;
    if(other.froze)
    return;
    if(action == 1){
    return;
    }
    if(other.playerName.equalsIgnoreCase(playerName)){
    sM("Other player is busy at the moment.");
    return;
    }
    if(other.action == 1){
    return;
    }
    if(other.playerRights == 2){
    sM("Admins cannot trade.");
    return;
    }
    if(playerRights == 2){
    sM("Admins cannot trade.");
    return;
    }
    Reply With Quote  
     

  2. #2  
    Austin_
    Guest
    if (c.connectedFrom == o.connectedFrom || o.connectedFrom == c.connectedFrom) {
    c.sendMessage("You cannot trade to the same ip. Nice try cheater!");
    return;
    }

    Try that.
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Oct 2009
    Age
    27
    Posts
    1,037
    Thanks given
    4
    Thanks received
    8
    Rep Power
    338
    Umm Cannot Find Symbols


    c.connectedFrom
    o.connectedFrom
    o.connectedFrom
    c.connectedFrom
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Oct 2009
    Age
    27
    Posts
    1,037
    Thanks given
    4
    Thanks received
    8
    Rep Power
    338
    anyone?
    Reply With Quote  
     

  5. #5  
    Bot
    Bot is offline
    You're My Favourite!

    Join Date
    Aug 2007
    Posts
    1,282
    Thanks given
    485
    Thanks received
    72
    Rep Power
    1397
    Code:
    if (connectedFrom == other.connectedFrom || other.connectedFrom == connectedFrom) {
    sM("You cannot trade to the same ip. Nice try cheater!");
    return;
    }
    happy?


    [Only registered and activated users can see links. ]

    With Love, Bot.
    Reply With Quote  
     

  6. #6  
    Banned

    Join Date
    Sep 2009
    Posts
    3,247
    Thanks given
    195
    Thanks received
    255
    Rep Power
    0
    remove the lettersjust leave conectedfrom or look in playerhandler.java for the method
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Oct 2009
    Age
    27
    Posts
    1,037
    Thanks given
    4
    Thanks received
    8
    Rep Power
    338
    Still Lets You Trade?

    Someone jus edit my code.... pissin me off

    public void tradeReq(int id) {
    if (!server.trading) {
    sM("Trading has been temporarily disabled");
    return;
    }
    client other = (client) handler.players[id];
    if (validClient(trade_reqId)) {
    if (other.inTrade) {
    sM("Other player is busy at the moment.");
    trade_reqId = 0;
    return;
    }
    }
    if(other.interfaceOpened){
    int EnemyX = PlayerHandler.players[trade_reqId].absX;
    int EnemyY = PlayerHandler.players[trade_reqId].absY;
    TurnPlayerTo(EnemyX, EnemyY);
    sM("Other player is busy at the moment.");
    return;
    }
    if(froze)
    return;
    if(other.froze)
    return;
    if(action == 1){
    return;
    }
    if(other.playerName.equalsIgnoreCase(playerName)){
    sM("Other player is busy at the moment.");
    return;
    }
    if(other.action == 1){
    return;
    }
    if(other.playerRights == 2){
    sM("Admins cannot trade.");
    return;
    }
    if(playerRights == 2){
    sM("Admins cannot trade.");
    return;
    }
    Reply With Quote  
     

  8. #8  
    Registered Member

    Join Date
    Oct 2009
    Age
    27
    Posts
    1,037
    Thanks given
    4
    Thanks received
    8
    Rep Power
    338
    someone edit plox.
    Reply With Quote  
     

  9. #9  
    Registered Member

    Join Date
    Sep 2008
    Posts
    2,219
    Thanks given
    148
    Thanks received
    204
    Rep Power
    1570
    Code:
    public void tradeReq(int id) {
    	client other = (client) handler.players[id];
    	if (!server.trading) {
    		sM("Trading has been temporarily disabled");
    		return;
    	}
    	if (validClient(trade_reqId) || other.inTrade || other.interfaceOpened) {
    		sM("Other player is busy at the moment.");
    		return;
    	}
    	if (connectedFrom.equalsIgnoreCase(other.connectedFrom)) {
    		sM("You cannot trade yourself.");
    		return;
    	}
    	if (action > 0 || other.action > 0) {
    		return;
    	}
    	if (other.playerRights > 0 && other.playerRights < 4) {
    		sM("This player is staff and cannot trade.");
    		return;
    	}
    }

    [Only registered and activated users can see links. ]

    Reply With Quote  
     

  10. #10  
    Registered Member

    Join Date
    Oct 2009
    Age
    27
    Posts
    1,037
    Thanks given
    4
    Thanks received
    8
    Rep Power
    338
    Ty..Repped ;D
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •