50p Posted April 4, 2008 Posted April 4, 2008 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
[Ska]Vladmo Posted April 4, 2008 Author Posted April 4, 2008 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
fast_and_furius Posted April 5, 2008 Posted April 5, 2008 well this was made whit guns in freeroam so i belive it could be scritable
50p Posted April 5, 2008 Posted April 5, 2008 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...
[Ska]Vladmo Posted April 6, 2008 Author Posted April 6, 2008 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?
50p Posted April 6, 2008 Posted April 6, 2008 The use of cancelEvent outside of an event handler has no effect. It has to be used in events. When you use it, it will stop player from entering...
TheDeepFriedBoot Posted April 8, 2008 Posted April 8, 2008 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.
[Ska]Vladmo Posted April 8, 2008 Author Posted April 8, 2008 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now