ertlflorian1 Posted February 10, 2013 Posted February 10, 2013 Hi i hab a problem first time i drive into the marker i will work but the marker will be destroyed and another marker will be createt but when i drive in the second marker nothing happens. pos = { [1]="5247.93896,664.521,187.78101", [2]="5216.09521,610.77197,187.78101", [3]="5259.93506,674.84802,187.78101", [4]="5174.83203,610.63501,187.78101", [5]="5140.81885,606.42798,187.78101", [6]="5187.55518,534.37903,187.78101", [7]="5218.94824,530.72198,187.78101", [8]="5221.80615,484.772,187.78101", [9]="5234.22412,452.11401,187.78101", [10]="5265.18018,447.586,187.78101", [11]="5310.95996,448.216,187.78101", [12]="5334.08594,409.17999,187.78101", [13]="5353.43213,384.065,187.78101", [14]="5333.69824,488.246,187.78101", [15]="5352.70117,512.08899,187.78101", [16]="5323.17676,537.28198,187.78101", [17]="5263.91895,528.11902,187.78101", [18]="5286.38086,569.48901,187.78101", [19]="5299.03906,598.21198,187.78101", [20]="5254.46924,559.94,187.78101", [21]="5225.05322,584.86902,187.78101", [22]="5277.37305,495.98499,187.78101", [23]="5301.2168,478.81799,187.78101", } marker = createMarker (5263.91895,528.11902,187.78101, "checkpoint", 2.25, 255,0,0) function srandomveh (thePlayer) if getElementType ( thePlayer ) == "player" then pname = getPlayerName (thePlayer) local veh = getPedOccupiedVehicle (thePlayer) zahlm = math.random (1,23) x, y, z = getElementPosition (veh) local veh2 = getElementModel (veh) local portstring = pos[tonumber(zahlm)] local mX = gettok ( portstring, 1, string.byte(',') ) local mY = gettok ( portstring, 2, string.byte(',') ) local mZ = gettok ( portstring, 3, string.byte(',') ) setElementModel (veh, 411) setElementPosition (veh, x, y, z+0.5) destroyElement (marker) marker = createMarker (mX, mY, mZ, "checkpoint", 2.25, 255,0,0) fixVehicle (veh) end end addEventHandler ("onMarkerHit", marker, srandomveh)
PaiN^ Posted February 10, 2013 Posted February 10, 2013 What is this code for ?? " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
Scooby Posted February 10, 2013 Posted February 10, 2013 Hi i hab a problem first time i drive into the marker i will work but the marker will be destroyed and another marker will be createt but when i drive in the second marker nothing happens. Thats all u have added to ur code. if u want something to happen after that u will need to write it... [UVA]Scooby Founder Of UVA - Ultimate Vice Assassins http://www.uvaclan.com/
50p Posted February 10, 2013 Posted February 10, 2013 This should explain your problem. addEventHandler ("onMarkerHit", marker, srandomveh) - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
ertlflorian1 Posted February 10, 2013 Author Posted February 10, 2013 I dont know the problem cann you edit it for me?
PaiN^ Posted February 10, 2013 Posted February 10, 2013 I'm not an expert in race modes, but i could help But i need you to tell me what do you want the script to do ? " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
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