Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //########## Ballistic Vest
- //### Items
- datablock ItemData(gn_HardLeatherArmor)
- {
- uiName = "Hard Leather";
- iconName = "./icon_HArmor";
- image = gn_HardLeatherArmorImage;
- category = "Tools";
- className = "Weapon";
- shapeFile = "./hardleatherarmor.dts";
- mass = 1;
- density = 0.2;
- elasticity = 0;
- friction = 0.6;
- emap = true;
- doColorShift = true;
- colorShiftColor = "1 1 1 1";
- canDrop = true;
- };
- //### Item Image
- datablock shapeBaseImageData(gn_HardLeatherArmorImage)
- {
- shapeFile = "./hardleatherarmor.dts";
- emap = true;
- mountPoint = 0;
- className = "WeaponImage";
- item = gn_HardLeatherArmor;
- melee = false;
- doReaction = false;
- armReady = false;
- doColorShift = true;
- colorShiftColor = "1 1 1 1";
- stateName[0] = "Activate";
- stateTimeoutValue[0] = 0.1;
- stateTransitionOnTimeout[0] = "Ready";
- stateSound[0] = weaponSwitchSound;
- stateName[1] = "Ready";
- stateTransitionOnTriggerDown[1] = "Fire";
- stateAllowImageChange[1] = true;
- stateName[2] = "Fire";
- stateTransitionOnTriggerUp[2] = "Ready";
- stateTimeoutValue[2] = "0.2";
- stateFire[2] = true;
- stateAllowImageChange[2] = true;
- stateScript[2] = "onFire";
- };
- datablock ShapeBaseImageData(gn_HardLeatherArmorMountedimage)
- {
- shapeFile = "./hardleatherarmor.dts";
- emap = true;
- mountPoint = 7;
- offset = "0 0.03 0.63";
- eyeOffset = "0 0 10";
- rotation = eulerToMatrix("0 0 0");
- scale = "1 1 1";
- correctMuzzleVector = true;
- doColorShift = false;
- colorShiftColor = "1 1 1 1";
- stateName[0] = "Activate";
- stateTimeoutValue[0] = 0.1;
- stateTransitionOnTimeout[0] = "Idle";
- stateSound[0] = weaponSwitchSound;
- stateName[1] = "Idle";
- stateAllowImageChange[1] = true;
- };
- //### Functions
- function gn_HardLeatherArmorImage::onFire(%this,%obj,%slot)
- {
- %client = %obj.client;
- %player = %obj;
- if(isObject(%player))
- {
- if(%player.getMountedImage(1) $= nametoID(gn_HardLeatherArmorMountedimage)) %player.unmountImage(1);
- else
- {
- %player.unmountImage(1);
- %player.mountImage(gn_HardLeatherArmorMountedimage,1);
- }
- }
- }
- function gn_HardLeatherArmorMountedimage::onMount(%this,%obj,%slot)
- { %obj.hideNode(armor); messageClient(%obj.client,"","\c3You put on the \c7Hardened Leather Armor\c3 (\c2+10%\c3 Body Protection)!");
- setMaxForwardSpeed(17);
- setMaxBackwardSpeed(17);
- setMaxSideSpeed(17);
- setMaxCrouchForwardSpeed(17);
- setMaxCrouchBackwardSpeed(17);
- setMaxCrouchSideSpeed(17);
- }
- function gn_HardLeatherArmorMountedimage::onUnMount(%this,%obj,%slot)
- { messageClient(%obj.client,"","\c3You took off the \c7Hardened Leather Armor\c3 (\c0-10%\c3 Body Protection)!");
- setMaxForwardSpeed(17);
- setMaxBackwardSpeed(17);
- setMaxSideSpeed(17);
- setMaxCrouchForwardSpeed(17);
- setMaxCrouchBackwardSpeed(17);
- setMaxCrouchSideSpeed(17);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement