Okay, does anyone have any idea or reason why hitplayer doesn't work properly? It only allows you to hit other players when they have it equipped also, but not when they don't have it equipped.
Quote:
//#CLIENTSIDE
if (weaponfired) {
if (this.use = 0) {
equip();
this.use = 1;
} else {
unequip();
this.use = 0;
}
}
if (strequals(spear_sl_stab,#m)) {
if (keydown(5)) {
for (this.p = 1; this.p < playerscount; this.p++) {
this.dx = playerx - players[this.p].x;
this.dy = playery - players[this.p].y;
this.dist = (this.dx^2 + this.dy^2)^0.5;
if (this.dist <= 3.5) hitplayer this.p,1,playerx,playery;
}
}
}
}
function equip() {
replaceani idle,spear_sl_idle;
replaceani walk,spear_sl_walk;
replaceani sword,spear_sl_stab;
}
function unequip() {
replaceani idle,idle;
replaceani walk,walk;
replaceani sword,sword;
}
|