i did rescript it see
//#CLIENTSIDE
if (created||initialized){
timeout=0.05;
setstring clientr.swordimg,#1();
setstring client.swordpower,#v(playerswordpower);
}
if (keypressed) {
if (strequals(#p(1),1)) {
triggeraction playerx+1.5+vecx(playerdir)*2,playery+2+vecy(playe rdir)*2,swordhit,#a;
freezeplayer 0.25;
setani sword2,clientr.swordimg;
}
timeout=0.1;
}
if (actionswordhit) {
if (!strequals(#m,dead)){
freezeplayer .3;
setani hurt,;
hearts=strtofloat(#I(client.hp,0))-strtofloat(#s(client.swordpower));
replacestring client.hp,0,#v(hearts);
}
}
OR i have this one
//#CLIENTSIDE
if(created){
this.firing=0;
}
if (keydown2(keycode(g),true)){
this.firing=1;
this.p = players[0].swordpower;
this.q = this.p;
play sword.wav;
for (this.i=9;this.i<14; this.i++){
freezeplayer 1;
players[0].sprite=this.i;
testhurt();
sleep .05;
}
freezeplayer 0;
this.firing=0;
}
function testhurt()
for (this.a=1;this.a<playerscount;this.a++)
{if (abs(players[0].x-players[this.a].x)<3 && abs(players[0].y-players[this.a].y)<3)
hitplayer this.a,this.q,players[this.a].x,players[this.a].y;}
for (this.b=0;this.b<compuscount;this.b++)
{if (abs(compus[0].x-compus[this.b].x)<3 && abs(compus[0].y-compus[this.b].y)<3)
hitcompu this.b,this.q,compus[this.b].x,compus[this.b].y;}
return;
all iam saing is that if he going to make commands they should work
