Blockland Forums > Modification Help

Is it possible to make a vehicle that you cannot exit?

Pages: (1/2) > >>

Sideswipe:

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

Conan:

ya just package the right click and prevent anyone from unmounting a vehicle packaging onMount like durka said is far better

Sideswipe:


--- Quote from: Conan on November 09, 2017, 09:09:22 PM ---ya just package the right click and prevent anyone from unmounting a vehicle

--- End quote ---
you are not speaking my language
package the right click?

DurkaDude:


--- Code: ---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);

--- End code ---
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.

Sideswipe:


--- Quote from: DurkaDude on November 09, 2017, 09:51:20 PM ---
--- Code: ---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);

--- End code ---

--- End quote ---
So I paste that into a server.cs?

Pages: (1/2) > >>

Go to full version