View Single Post
  #11  
Old 05-06-2012, 06:48 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Fysez View Post
CBK,
I think i've listed quite clearly now that the script I listed was a test,
Not the actual thing to disable since it doesn't even work anyways.
All I need is how to fix the script I have listed. From there, I can work my own way towards disabling swords.
Get it not?{o}.{o}
No, it wasn't clear what you were saying:

Quote:
Originally Posted by Fysez View Post
Using that, I tried it as a test run under weapons. But it doesn't seem to work?:
We can't guess what you're trying to say. The code isn't working for a few reasons:
  • You don't need an "if (weaponfired)" inside an onWeaponFired event; the former is a GS1 remnant that should never be used.
  • setani requires two parameters, e.g. setAni("swim", null);
  • Make sure it's clientside if it's not already.

Quote:
Originally Posted by Fysez View Post
The problem is, Now I can't use my inventory (Q) and I can't use items (D)
Would you know how to fix this? I've been looking into it but can't seem to figure it out.
For firing weapons, you need to add something like this somewhere, clientside:

PHP Code:
function GraalControl.onKeyDown(temp.codetemp.key) {
  if (
temp.key == "d" && ! this.keyD) {
    
player.weapon.trigger("weaponFired"); // v6 only, add another parameter to support v5
    
this.keyD true;
  }
}

function 
GraalControl.onKeyUp(temp.codetemp.key) {
  if (
temp.key == "d") {
    
this.keyD false;
  }

edit: use the code Jer posted; his is preferable since it allows players to set their own keys

Put that in some system weapon that all players have.

To enable Q (not positive if it works when weapons are disabled—test it), don't remove it from "allfeatures" in your enablefeatures. See here.
__________________
Reply With Quote