This topic was marked solved by Doom_Kill3R, on September 14th, 10:48 AM
How to lock a bike?

Kenneth Law

  • Newbie
  • Posts: 23
How to lock a bike?
«  »
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

  • Hero Member
  • Developer of "Web-Net" search engine
  • Posts: 689
Re: How to lock a bike?
« Reply #1,  »
Quote from Kenneth Law on September 10th, 09:57 AM
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?
hmm well, try to eject player from vehicle and display message its locked but define if its vehicle 191 for bike

Kenneth Law

  • Newbie
  • Posts: 23
Re: How to lock a bike?
« Reply #2,  »
Quote from MEGAMIND on September 10th, 11:30 AM
Quote from Kenneth Law on September 10th, 09:57 AM
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?
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

  • Wiki Contributor
  • LBR | Co-Leader & Brasil Real RPG | Developer
  • Posts: 444
Re: How to lock a bike?
« Reply #3,  »
Quote from Kenneth Law on September 10th, 11:49 AM
Quote from MEGAMIND on September 10th, 11:30 AM
Quote from Kenneth Law on September 10th, 09:57 AM
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?
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:

Code: [Select]
function onPlayerEnteringVehicle( player, vehicle, door )
{
if( vehicle.Model == 191 ) return 0;
}
Code: [Select]
if( !sucess ) tryAgain();

Kenneth Law

  • Newbie
  • Posts: 23
Re: How to lock a bike?
« Reply #4,  »
Quote from MatheuS on September 10th, 12:45 PM
Quote from Kenneth Law on September 10th, 11:49 AM
Quote from MEGAMIND on September 10th, 11:30 AM
Quote from Kenneth Law on September 10th, 09:57 AM
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?
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:

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

MEGAMIND

  • Hero Member
  • Developer of "Web-Net" search engine
  • Posts: 689
Re: How to lock a bike?
« Reply #5,  »
Quote from MatheuS on September 10th, 12:45 PM
Quote from Kenneth Law on September 10th, 11:49 AM
Quote from MEGAMIND on September 10th, 11:30 AM
Quote from Kenneth Law on September 10th, 09:57 AM
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?
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:

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

Athanatos

  • Hero Member
  • Romania Cops N Robbers Lead Developer
  • Posts: 794
Re: How to lock a bike?
« Reply #6,  »
Quote from Kenneth Law on September 10th, 09:57 AM
I'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

  • Newbie
  • Posts: 23

Athanatos

  • Hero Member
  • Romania Cops N Robbers Lead Developer
  • Posts: 794
Re: How to lock a bike?
« Reply #8,  »
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

  • Newbie
  • Posts: 23

Doom_Kill3R

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,103
Re: How to lock a bike?
« Reply #10,  »
The solution has been posted therefore closing this.