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

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;
}
if (c.connectedFrom == o.connectedFrom || o.connectedFrom == c.connectedFrom) {
c.sendMessage("You cannot trade to the same ip. Nice try cheater!");
return;
}
Try that.

Umm Cannot Find Symbols
c.connectedFrom
o.connectedFrom
o.connectedFrom
c.connectedFrom

anyone?

happy?Code:if (connectedFrom == other.connectedFrom || other.connectedFrom == connectedFrom) { sM("You cannot trade to the same ip. Nice try cheater!"); return; }

remove the lettersjust leave conectedfrom or look in playerhandler.java for the method

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;
}

someone edit plox.

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; } }

Ty..Repped ;D
| « Store all problem | I need help with a shop problem. » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |