![]() |
Sword/Gani Script - Help
I've got the whole Gani part working. Problem is,
Once I equip and use the item, It doesn't allow me to un-equip? PHP Code:
|
Quote:
if (this.on = false) should be if(this.on == false) = sets values, == checks for equivalency. Even if that was fixed it still wouldn't work, !this.on is the same thing as this.on == false, so you are checking if the weapon is off in both your if statements. Also your aren't setting this.on back to false at any point, so once you unequip it once its going think its still on and you won't be able to reequip it. And you aren't resetting your walk gani to walk when you turn it off. |
Quote:
PHP Code:
|
Try this, it should work
PHP Code:
|
As Starfire2001 just said, a single equals sign is for assignment, while two are for testing equality.
Styling your code, as you should have done before posting: PHP Code:
PHP Code:
|
PHP Code:
|
Did you even read what I said?
If you're copying and pasting, remember to remove the space at the end of the clientside line. |
Quote:
PHP Code:
|
Quote:
I'd rather learn than not learn, and do "Style" instead. x.x |
Quote:
|
Quote:
|
Quote:
All I ask is for help on a script to make it work. Not how to style and make my script look all pretty and sparkly. |
Quote:
|
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:
|
Quote:
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. |
Quote:
|
| All times are GMT +2. The time now is 05:32 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.