Jump to content

random vehicles


meh

Recommended Posts

First create the map with all the positions you want the marker to be then in the script you could get the map and set it's random position.

i don't have the script that can do such thing. or maybe i do, idk if it's what i think it is.

  
 local delayvalue = false 
datmarker = createMarker (4216.8994140625,-479.3994140625,37.299999237061,"corona",5,12,7,77,153) 
  
  
  
function changeVehFunc ( hitPlayer, matchingDimension ) 
 if (matchingDimension and hitPlayer == localPlayer) then 
  if delayvalue == false then 
   triggerServerEvent("changeVeh", localPlayer) 
   delayvalue = true 
   setTimer(function () 
    delayvalue = false 
    end, 15000, 1) 
  end 
 end 
end 
  
  
  
addEventHandler("onClientMarkerHit", datmarker, changeVehFunc) 

Link to comment
addEventHandler ( "onPickupUse", root, function(playerWhoUsed) 
   --Script here 
end) 

hm, so that thing that've posted actually works? i can use it? sry for noobish questions, i've never made a map that had a script in it. yet.

Link to comment
well, it'll be on all the maps that you start, unless you stop it...

It can work but your going to need a script to enable it to work on a certain map.

haha, stop what? mapping? :lol:

okay, how this script should look like? where do i begin? please don't tell me to learn lua, it's almost like telling "learn english" to a man who only wants to say "fakk you". just an example of ppl's needs and methods of their fulfilling.

Link to comment

here:

addEventHandler ( "onPickupHit", root, function(playerWhoUsed) 
   --Script here 
end) 

In the "script here" part, put what you want to do (in lua)

this is the only event that could help you with the change vehicle and limitation of the pick up

Edited by Guest
Link to comment
If the pickup is created in the Map Editor, you will need open your map file every time you create a pickup and get positions, etc and create in a script file to use your way.
This event is triggered when a player hits a pickup.

He doesn't want the position of the pick up, he wants when the player hits the pick up, their vehicle changes and it's only limited to ground vehicles.

Edited by Guest
Link to comment
here:
addEventHandler ( "onPickupHit", root, function(playerWhoUsed) 
   --Script here 
end) 

In the "script here" part, put what you want to do (in lua)

how do i do that?

As far as I know, he's talking about "race" game mode vehicle change pickups,

ye, right. all this time we've been tlaking about race mode.

Link to comment

damn right. i'm sorry i didn't mention it right on the start. i've been playing this mode for so long, that it has become the whole mta for me. like the only game mode mta has to offer. now i see it's far from the truth lol.

Link to comment

MTA has many other game modes to offer, as well as powerful scripting functions which can be used to create your own game mode ( s ).

Back on topic: What you want to do is create a new setting in your maps which will set random vehicles instead of the predefined in the map file, right?

Link to comment
MTA has many other game modes to offer, as well as powerful scripting functions which can be used to create your own game mode ( s ).

Back on topic: What you want to do is create a new setting in your maps which will set random vehicles instead of the predefined in the map file, right?

basically i wanna a script that does something like this

(i apologize for the faggotry that's going on here, i wasn't able to find a better video of this map)

or this:

Link to comment

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