![]() |
Equip/Unequip Weapons
Nearly ready for release, but my server can't be released without the option to equip/unequip, I gave it a shot but I press D, it switchs to punch, i punch then i press S again and the player attacks with an invisible sword??
Weapons/Test D Unequip PHP Code:
PHP Code:
|
Not that it makes much difference but using a switch would be much cleaner. Zero(Zokemon) made a post about it a while back. I'm browsing from my phone or I'd find the post for you.
|
That sucks that your script doesn't work properly maybe you should try and debug it.
or Re-design your script to use 1 Weapon-NPC to handle shooting + fists, and have other weapons store configuration/statistical information and call generic methods in the weapon system like equip, unequip, and attack and use player.selectedweapon to process the actions accordingly. |
i HOPE ive found the problem, it never changes player.weapon how can i do that?
|
selectedweapon = str; clientside?
|
Quote:
Clientside: selectedweapon - integer selectedweapon = player.weapons.index(findweapon("WeaponName")); |
err this is why i liked commands.rtf, is it like selectedweapon = "bomb"; ?
|
Got it XD
PHP Code:
|
| All times are GMT +2. The time now is 05:24 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.