Author Topic: Is it possible to make a vehicle that you cannot exit?  (Read 1376 times)

/title
Or is there a way to make it so you cannot exit vehicles (for everyone on the server?)

ya just package the right click and prevent anyone from unmounting a vehicle packaging onMount like durka said is far better
« Last Edit: November 10, 2017, 01:46:09 AM by Conan »

ya just package the right click and prevent anyone from unmounting a vehicle
you are not speaking my language
package the right click?

Code: [Select]
package CannotDismount
{
function armor::onMount(%datablock,%player,%vehicle,%point)
{
if(%vehicle.dataBlock.cannotDismount)
%player.canDismount = 0;
return parent::onMount(%datablock,%player,%vehicle,%point);
}
};
activatePackage(CannotDismount);
Alternatively you could package the armor::onTrigger function BUT since that function is called every-time a player does anything and is packaged by a hundred other mods I would not recommend it.

Code: [Select]
package CannotDismount
{
function armor::onMount(%datablock,%player,%vehicle,%point)
{
if(%vehicle.dataBlock.cannotDismount)
%player.canDismount = 0;
return parent::onMount(%datablock,%player,%vehicle,%point);
}
};
activatePackage(CannotDismount);
So I paste that into a server.cs?

So I paste that into a server.cs?
Yes, and make sure the vehicle datablock has cannotDismount set to 1.

Yes, and make sure the vehicle datablock has cannotDismount set to 1.
OK, will try later.

<nvm kyuande needs to read>