Blockland Forums > Modification Help
Vehicles and ironsights
(1/2) > >>
Minnax:

--- Code: ---function Armor::onTrigger(%this, %player, %slot, %val)
{
if(%player.getMountedImage(0) $= Mac10Image.getID() && %slot $= 4 && %val)
{
if(!%obj.isMounted())
%player.mountImage(IronSightMac10Image,0);
}     
else if(%player.getMountedImage(0) $= IronSightMac10Image.getID() && %slot $= 4 && %val)
{
%player.mountImage(Mac10Image,0);
}
Parent::onTrigger(%this, %player, %slot, %val);
}
--- End code ---
I am trying to make it so when you get out of a vehicle, you will not go to the iron sights, since both the gun and vehicle use the jet button. And yes, i packaged it, but it isn't included here.
indyjones:
What are you wondering?
Minnax:

--- Quote from: indyjones on January 13, 2012, 08:24:04 AM ---What are you wondering?

--- End quote ---
I'm wondering what I am doing wrong, since it doesn't work.
CityRPG:
if(!isObject(%obj.getObjectMount()))
Minnax:

--- Quote from: CityRPG on January 13, 2012, 12:54:44 PM ---if(!isObject(%obj.getObjectMount()))

--- End quote ---
didn't work :c
Navigation
Message Index
Next page

Go to full version