meh Posted April 10, 2012 Posted April 10, 2012 hey. i'd like to make map that has a random vehiclechange pickup. and also, i'd like to limit that pickup to only land vehicles (no boats, planes, trains and stuff). any idea how do i do that? thanx in advance!
TwiX! Posted April 10, 2012 Posted April 10, 2012 only markers(script) or checkpoints - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
meh Posted April 10, 2012 Author Posted April 10, 2012 or checkpoints how to do that? i guess it's easier, tho im not able to find "a random" option in the map editor.
Jaysds1 Posted April 10, 2012 Posted April 10, 2012 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. My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
meh Posted April 10, 2012 Author Posted April 10, 2012 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)
Jaysds1 Posted April 10, 2012 Posted April 10, 2012 so, you want the markers to be in different places right? My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Jaysds1 Posted April 10, 2012 Posted April 10, 2012 ok, forget about the markers, you want the vehicle pickup limited right? What pickup are you using? My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
meh Posted April 10, 2012 Author Posted April 10, 2012 What pickup are you using? default vehicle change pickup. nothing fancy.
Jaysds1 Posted April 10, 2012 Posted April 10, 2012 you can use: addEventHandler ( "onPickupUse", root, function(playerWhoUsed) --Script here end) My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
meh Posted April 10, 2012 Author Posted April 10, 2012 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.
Jaysds1 Posted April 10, 2012 Posted April 10, 2012 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. My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
meh Posted April 10, 2012 Author Posted April 10, 2012 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? 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.
Jaysds1 Posted April 10, 2012 Posted April 10, 2012 (edited) 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 April 10, 2012 by Guest My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
drk Posted April 10, 2012 Posted April 10, 2012 Jaysds1, don't forget that this function will execute with every pickup. EPT Team Server Development: 0% Learning C++ | C++ is amazing
Jaysds1 Posted April 10, 2012 Posted April 10, 2012 ya, and he could use: if source== pickID then .... My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
drk Posted April 10, 2012 Posted April 10, 2012 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. EPT Team Server Development: 0% Learning C++ | C++ is amazing
Jaysds1 Posted April 10, 2012 Posted April 10, 2012 (edited) 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 April 10, 2012 by Guest My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
drk Posted April 10, 2012 Posted April 10, 2012 And that's what I said. EPT Team Server Development: 0% Learning C++ | C++ is amazing
Castillo Posted April 10, 2012 Posted April 10, 2012 @Jaysds1: As far as I know, he's talking about "race" game mode vehicle change pickups, they aren't pickups, they are objects rotating. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
meh Posted April 10, 2012 Author Posted April 10, 2012 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.
Jaysds1 Posted April 10, 2012 Posted April 10, 2012 So, you've been talking about race mode the whole time? My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
meh Posted April 10, 2012 Author Posted April 10, 2012 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.
Castillo Posted April 10, 2012 Posted April 10, 2012 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? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
meh Posted April 10, 2012 Author Posted April 10, 2012 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:
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