View Single Post
  #5  
Old 12-16-2003, 01:14 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: Rescripted D + Disable Sword

Quote:
Originally posted by KuJiGX
Well. I seen a few threads about disabling sword so here you people go. Rescripted D.
NPC Code:

//#CLIENTSIDE
if (timeout || isweapon) {
disableweapons;
setarray this.keydown,11;
setarray this.oldkeydown,11;
for (this.i=0;this.i<11;this.i++) {
this.oldkeydown[this.i]=this.keydown[this.i];
this.keydown[this.i]=(keydown(this.i));
}
if (this.keydown[4]==true && this.oldkeydown[4]==false && selectedweapon>=0) callweapon selectedweapon,weaponfired;
timeout = 0.05;
}



Any problems please tell me.
Why use isweapon? There is no point to it anymore. It was for when we didn't have an NPC-Server and servers had to execute things on the npc only when it was a weapon. Toweapons is never used, or at least it is shunned when used.
Reply With Quote