View Single Post
  #1  
Old 07-30-2005, 12:57 AM
raiden0899 raiden0899 is offline
Registered User
raiden0899's Avatar
Join Date: Oct 2004
Posts: 192
raiden0899 is on a distinguished road
Question Script Not Working

I made a small NPC just to see what the keycodes were (like 'a' is 65). It works with all the keys except the arrow keys. Here's the script:
NPC Code:

//#CLIENTSIDE
if (created) {
this.on=0;
}
if (weaponfired) {
if (this.on==0) {
this.on=1;
disabledefmovement;
}
else {
if (this.on==1) {
this.on=0;
enabledefmovement;
}
}
}
if (keypressed&&this.on==1) {
setplayerprop #c,Code=#p(0) Key=#p(1);
}


Anyone know why it won't work?
Reply With Quote