Michael_Tuner Posted March 23, 2010 Share Posted March 23, 2010 I have made 1/2 a script. It is that you have to jack a truck and bring it to a place on the square. I know about 75% but the parmeters and arguments I don't know. I need some explanation for that. The problem is I have made only one marker. How to make many markers and pick a random one. Please tell me. Link to comment
50p Posted March 23, 2010 Share Posted March 23, 2010 I have made 1/2 a script. It is that you have to jack a truck and bring it to a place on the square. I know about 75% but the parmeters and arguments I don't know. I need some explanation for that.The problem is I have made only one marker. How to make many markers and pick a random one. Please tell me. Explain little more what you don't know? You can make a map file with your markers in it, randomly choose one of them and create it with createMarker. That's what I did with my "trucker" script on FREESTATEPROJECT server. Knowing "element tree" is a plus to script it easier: https://wiki.multitheftauto.com/wiki/Element_tree Link to comment
Michael_Tuner Posted March 23, 2010 Author Share Posted March 23, 2010 The Idea is:- Current There is a boxwille on a garage. When a player enters it. A blip shows and and a marker appears on the Square of LS. When this boxwille is brought there in 10 sec. Boom All of a sudden an explosion is caused through createExplosion. I want to make it. There is a boxwille on a garage. When a player enters it there should be many markers and many blips or make it 1 random marker from a 27 markers. When the van is brought to the place Boom All of a sudden the car blows through createExplosion. Another problem I found:- The explosion is Client-side. How to make the script and the markers client-side and only the explosion Serverside. Optional:- If the script is made the players will frequently use the truck. How to make it respawn only once in 20 min. And I want to make an escort. When the player enters the vehicle It asks for 2 players each on a sanchez next to the Van. If the van bikes are empty the driver of the van doesnt start. And the bike shouldn't get jacked. If all are Ok Then continue the mission. Money:- It can be done by me for the Van driver. How to give money for the escorts? Thats the script. Link to comment
karlis Posted March 23, 2010 Share Posted March 23, 2010 ill specify "truck" as your truck element ------ create markers with .map file and call them eg . "truckMarker1"-"truckMarker27", and then randommarker=getElementByID("truckMarker"..math.random(1,27)) ------ lock: --serverside addEventHandler("onVehicleEnter",truck,function() setVehicleLocked(truck,true) end) addEventHandler("onVehicleStartExit",truck,function() setVehicleLocked(truck,false) end) ------ respawn: --serverside addEventHandler("onVehicleExit",truck,function(_,seat) if seat==0 then respawntimer=setTimer(function() respawnVehicle(truck) end,1200000,1) end end) addEventHandler("onVehicleEnter",truck,function() if isTimer(respawntimer) then killTimer(respawntimer) end end) ------- explosion: triggerServerEvent(functionname,source,arguments) and make explosion code serverside --- anyway if you even dont know how to trigger events to server you shouldn't make so complicated scripts Link to comment
Michael_Tuner Posted March 23, 2010 Author Share Posted March 23, 2010 Oh Thank you very much. Link to comment
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