View Single Post
  #5  
Old 08-29-2011, 07:21 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Gunderak View Post
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.
__________________
Quote:
Reply With Quote