Author Topic: Disabling Pipe Wrench inside vehicle  (Read 606 times)

I want the Pipe Wrench to be disabled somehow when the user is inside a vehicle. This forces the player to get out of the vehicle before repairing.

Any tips?

I want the Pipe Wrench to be disabled somehow when the user is inside a vehicle. This forces the player to get out of the vehicle before repairing.

Any tips?
Hahahahaha
Can you give me the script?

Code: [Select]
function pipeWrenchImage::onHitObject(%this, %obj, %slot, %col, %pos, %normal)
{
// Interiors do not have the getType function and will have console spam if you wrench the bedroom.
// Otherwise, we're checking for a vehicle or a Tank Turret.
if(isObject(%client = %obj.client) && (%col.getClassName() !$= "InteriorInstance") && (%col.getType() & $TypeMasks::VehicleObjectType || (isObject(TankTurretPlayer) ? %col.getDatablock().getID() == TankTurretPlayer.getID() : 0)))
{
if(!isObject(%obj.getObjectMount()))
{
Do you have that? I see it that it won't repair if they're on a vehicle

No, is that from a more recent version?


Ok, thanks. My old one was also v1, so it didn't update automatically.
Dogfight runs next week, and I'm doing some preparations tonight and tomorrow.