How to lock a bike?

Started by Kenneth Law, Sep 10, 2019, 08:57 AM

Previous topic - Next topic

Kenneth Law

How can I lock a bike? I've used the code vehicle.Locked=true but players can still get in the bike. So any way to lock it?

MEGAMIND

Quote from: Kenneth Law on Sep 10, 2019, 08:57 AMHow can I lock a bike? I've used the code vehicle.Locked=true but players can still get in the bike. So any way to lock it?
hmm well, try to eject player from vehicle and display message its locked but define if its vehicle 191 for bike

Kenneth Law

Quote from: MEGAMIND on Sep 10, 2019, 10:30 AM
Quote from: Kenneth Law on Sep 10, 2019, 08:57 AMHow can I lock a bike? I've used the code vehicle.Locked=true but players can still get in the bike. So any way to lock it?
hmm well, try to eject player from vehicle and display message its locked but define if its vehicle 191 for bike
It's too wired to eject a player from a bike. In fact, the server Argonath RPG has found a way to avoid a player from getting on a bike without ejection. But I don't know how that is done. So I want someone to tell me.

MatheuS

Quote from: Kenneth Law on Sep 10, 2019, 10:49 AM
Quote from: MEGAMIND on Sep 10, 2019, 10:30 AM
Quote from: Kenneth Law on Sep 10, 2019, 08:57 AMHow can I lock a bike? I've used the code vehicle.Locked=true but players can still get in the bike. So any way to lock it?
hmm well, try to eject player from vehicle and display message its locked but define if its vehicle 191 for bike
It's too wired to eject a player from a bike. In fact, the server Argonath RPG has found a way to avoid a player from getting on a bike without ejection. But I don't know how that is done. So I want someone to tell me.

try using this:

function onPlayerEnteringVehicle( player, vehicle, door )
{
if( vehicle.Model == 191 ) return 0;
}
if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.

Kenneth Law

Quote from: MatheuS on Sep 10, 2019, 11:45 AM
Quote from: Kenneth Law on Sep 10, 2019, 10:49 AM
Quote from: MEGAMIND on Sep 10, 2019, 10:30 AM
Quote from: Kenneth Law on Sep 10, 2019, 08:57 AMHow can I lock a bike? I've used the code vehicle.Locked=true but players can still get in the bike. So any way to lock it?
hmm well, try to eject player from vehicle and display message its locked but define if its vehicle 191 for bike
It's too wired to eject a player from a bike. In fact, the server Argonath RPG has found a way to avoid a player from getting on a bike without ejection. But I don't know how that is done. So I want someone to tell me.

try using this:

function onPlayerEnteringVehicle( player, vehicle, door )
{
if( vehicle.Model == 191 ) return 0;
}
Cool! It works! Thanks a lot for your help!

MEGAMIND

Quote from: MatheuS on Sep 10, 2019, 11:45 AM
Quote from: Kenneth Law on Sep 10, 2019, 10:49 AM
Quote from: MEGAMIND on Sep 10, 2019, 10:30 AM
Quote from: Kenneth Law on Sep 10, 2019, 08:57 AMHow can I lock a bike? I've used the code vehicle.Locked=true but players can still get in the bike. So any way to lock it?
hmm well, try to eject player from vehicle and display message its locked but define if its vehicle 191 for bike
It's too wired to eject a player from a bike. In fact, the server Argonath RPG has found a way to avoid a player from getting on a bike without ejection. But I don't know how that is done. So I want someone to tell me.

try using this:

function onPlayerEnteringVehicle( player, vehicle, door )
{
if( vehicle.Model == 191 ) return 0;
}
yes ofc why not

NicusorN5

Quote from: Kenneth Law on Sep 10, 2019, 08:57 AMI've used the code vehicle.Locked=true but players can still get in the bike.
Read posts carefully, and don't use google translate.

Kenneth Law

Quote from: Athanatos on Sep 10, 2019, 06:56 PM
Quote from: Kenneth Law on Sep 10, 2019, 08:57 AMI've used the code vehicle.Locked=true but players can still get in the bike.
Read posts carefully, and don't use google translate.
I wasn't using any translator man. And which post exactly do you refer to?

NicusorN5

I was reffering to Alecu's post, sorry for the confusion. I used your post to told him that you already tried CVehicle::Locked

Kenneth Law


DizzasTeR

The solution has been posted therefore closing this.