![]() |
Change active NPC?
Hello, how can I change the active (the one that gets used when you press D) weapon npc through code? I guess it could be done through a trigger, but i dont know the name of it.
thanks for any help :) |
wtf are you talking about? If you're talking about just changing the selected weapon, here.
PHP Code:
|
hrm i think selectedweapon is the id of the current weapon
you could loop through the player.weapons array and use weapon.name to get the name like NPC Code: edit: damn too slow |
Quote:
|
Quote:
Okay, you just did the same exact thing I did. Selectedweapon is the current weapon, its writable. |
but yours is gs1 =(
|
actually, i found a better way.
PHP Code:
|
well at wiki it says player.weapon is read only
|
May be selectedweapon = player.weapons.index(findweapon(weaponname)) ?
|
| All times are GMT +2. The time now is 06:44 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.