Author Topic: [req] script to unhide hands after the player leaves the vehicle  (Read 167 times)

because some brilliant vehicle maker forgot to unhide them

Code: (ineedhands.cs) [Select]
package INeedHandsPackage
{
function Armor::onUnMount(%this, %player, %vehicle, %slot)
{
Parent::onUnMount(%this, %player, %vehicle, %slot);
if(isObject(%client = %player.client))
{
if(%client.rhand)
%player.unhidenode("rHook");
else
%player.unhidenode("rHand");
if(%client.lhand)
%player.unhidenode("lHook");
else
%player.unhidenode("lHand");
}
}
};
activatepackage(INeedHandsPackage);

If you want to lock it to only work when exiting a specific vehicle:
Code: (ineedhands.cs) [Select]
package INeedHandsPackage
{
function Armor::onUnMount(%this, %player, %vehicle, %slot)
{
Parent::onUnMount(%this, %player, %vehicle, %slot);
if(isObject(%client = %player.client)&&%vehicle.getDatablock().getName()$="JeepVehicle")
{
if(%client.rhand)
%player.unhidenode("rHook");
else
%player.unhidenode("rHand");
if(%client.lhand)
%player.unhidenode("lHook");
else
%player.unhidenode("lHand");
}
}
};
activatepackage(INeedHandsPackage);