If you're going to make a pvp server don't add NPC combat...
|
hello when i fight npcs in my pvp server i get the timer and ppl can att me or players how do i make it so when u fight npcs it just stay like if u are in home fighting an npc i realy need this
If you're going to make a pvp server don't add NPC combat...
Check if the player's target has a valid player ID.
Create a separate boolean for combat with NPC from combat with players; what'll be happening is that your PvP system will be reading the player as being in combat so giving them the PvP timer and making them attackable because of this, despite the fact that it's an NPC rather than a player that they're fighting.
this one is for PvP right?
Code:private boolean AttackPvP() { client AttackingOn2 = (client) server.playerHandler.players[AttackingOn]; int EnemyX = PlayerHandler.players[AttackingOn].absX; int EnemyY = PlayerHandler.players[AttackingOn].absY; int offsetX = (absY - EnemyY) * -1; int offsetY = (absX - EnemyX) * -1; actionlog = 10; AttackingOn2.actionlog = 10; if(AttackingOn2.uber) { sM("You cannot attack a staff."); ResetAttack(); return false; }
bump
another bump
fixed that ucant pk players now so mod please lock
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |