Quote:
Originally Posted by Gunderak
wow, that was incredibly easy. i feel so dumb.
is there any way to check if the weapon the player is trying to set as a button has onWeaponFired(){ in it to see if its allowed to be equiped or not? thanks.
now i just need to script dragging of weapons to slots 
|
You should just set a flag in the weapon to check if it's a "weapon" on your server. I.e:
PHP Code:
//#CLIENTSIDE
function onCreated() {
this.itemtype = "weapon";
}
then you can use:
if (player.weapon.itemtype == "weapon") {
else where.
Quote:
Also is it ok if i use your online npc maker?
iv tested around with it and its brilliant!
|
It was made for others to use.
Quote:
|
Edit: shouldnt it have to be player.weapon.name.trigger?
|
No. player.weapon is the object currently selected weapon and player.weapon.name is just the weapon's name.
You can get weapon objects by using findweapon or referencing the object directly. I.e:
For -System
findweapon("-System") or
(@"-System") both would refer to the -System weapon object. Direct referencing is more efficient but using findweapon is alright too.