Jump to content

[Req] How to ban vehicles?


Recommended Posts

Posted

What do you mean? Disallow entering specific model id? Just use use a table in which you store all the IDs of the vehicles and in onVehicleStartEnter, loop through the table checking if the vehicle (source) is equal to the one in the table.

http://development.mtasa.com/index.php? ... StartEnter

Posted

No, I meant when you spawn a vehicle with the /vehicle command something like this on the chat box would say:

Vehicle name - Banned vehicle, could not spawn!

or

Banned vehicle - could not spawn

Posted

well this was made whit guns in freeroam so i belive it could be scritable

2ps1xti.gif

My new name is: [PS]ThePro

Whe have 4 servers!!!!!

ak47.png

ak47.png

ak47.png

ak47.png

Pothole Studios is back in buissnes!

if my signature is too big pm me but dont just delete it plese.

Posted
No, I meant when you spawn a vehicle with the /vehicle command something like this on the chat box would say:

Vehicle name - Banned vehicle, could not spawn!

or

Banned vehicle - could not spawn

Take a look on wiki (the link I posted above) and see how they're found whether they are the vehicles you don't want to be used. Just do the same in the command.

1st. check if the vehicle is in the table (which you have to create, shown in the example)

2nd. if the id is in the table, output text saying that vehicle is "banned"

3rd. if there is no id in the table, createVehicle...

Posted
No, I meant when you spawn a vehicle with the /vehicle command something like this on the chat box would say:

Vehicle name - Banned vehicle, could not spawn!

or

Banned vehicle - could not spawn

Take a look on wiki (the link I posted above) and see how they're found whether they are the vehicles you don't want to be used. Just do the same in the command.

1st. check if the vehicle is in the table (which you have to create, shown in the example)

2nd. if the id is in the table, output text saying that vehicle is "banned"

3rd. if there is no id in the table, createVehicle...

I could probaly change it a little, but how would I change this:

addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) --add an event for onPlayerEnterVehicle 

To when you type that command it cancels the event?

Posted

Vladmo, if you have questions about our scripts, ask us. The people here dont necessarily know how ours work because they were not the ones who made them. We wont give the sctipts to you but we will give you hints.

bumper_giant_squid.zi4291svi7.jpgbumper_geek_pride.cepfyu3t1a.jpg

Posted
Vladmo, if you have questions about our scripts, ask us. The people here dont necessarily know how ours work because they were not the ones who made them. We wont give the sctipts to you but we will give you hints.

I am just finding some way to ban vehicles, people are spawning hydras in stuff with the vehicle command.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...