View Single Post
  #1  
Old 05-31-2003, 09:08 PM
Nitkizi Nitkizi is offline
Nil Recurring
Nitkizi's Avatar
Join Date: Jun 2002
Posts: 1,911
Nitkizi is on a distinguished road
Send a message via AIM to Nitkizi
Need help with hitplayer..

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;
}
__________________
I got wiring loose inside my head
I got books that I never ever read
I got secrets in my garden shed
I got a scar where all my urges bled
I got people underneath my bed
I got a place where all my dreams are dead
Swim with me into your blackest eyes

Last edited by Nitkizi; 05-31-2003 at 10:46 PM..
Reply With Quote