View Single Post
  #2  
Old 05-17-2012, 11:43 PM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
Quote:
Originally Posted by fowlplay4 View Post
I fail to see how you're having an issue with a toggle but I can tell if you plan to make multiple weapons that use this same kind of system, you'll be incurring a bad time.

Toggles are very basic and typically done like this:

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  if (
this.on) {
    
player.chat "I am no longer on.";
    
this.on false;
  } else {
    
player.chat "I am on.";
    
this.on true;
  }

If you completed my 'Staff Boots Challenge' on my tutorial you would have created a working toggle script.
I used that to test it, But it wasn't working on my script.

So I made a seperate Test one with only that code, as a test.
Every time I pressed D, it said "I am no longer on.", It doesn't work either.
It would not turn on.
Reply With Quote