ertlflorian1 Posted March 23, 2013 Posted March 23, 2013 Why it dont work? for i = 0,65535, 1 do local huette1 = createObject(11480, -2160.70508, 293.80402, 38.067, 0, 0, 90) local huette2 = createObject(11480, -2160.72998, 293.80002, 34.292, 0, 180, 270) --local huette1 = createObject(11319, -2170.10791, 293.772, 35.398, 0, 0, 0) local huette3 = createObject(11480, -2166.94702, 293.80099, 34.292, 0, 180, 270) local huette4 = createObject(11480, -2166.94604, 293.80002, 38.092, 0, 0, 90) setElementDimension (huette1, i) setElementDimension (huette2, i) setElementDimension (huette3, i) setElementDimension (huette4, i) end
golanu21 Posted March 23, 2013 Posted March 23, 2013 /debuscript 3 ? [Dev]BloWnRPG - We BloW the World [1%]
golanu21 Posted March 23, 2013 Posted March 23, 2013 for i = 0,65535, 1 do what is this? [Dev]BloWnRPG - We BloW the World [1%]
Sex* Posted March 23, 2013 Posted March 23, 2013 Why it dont work? for i = 0,65535, 1 do local huette1 = createObject(11480, -2160.70508, 293.80402, 38.067, 0, 0, 90) local huette2 = createObject(11480, -2160.72998, 293.80002, 34.292, 0, 180, 270) --local huette1 = createObject(11319, -2170.10791, 293.772, 35.398, 0, 0, 0) local huette3 = createObject(11480, -2166.94702, 293.80099, 34.292, 0, 180, 270) local huette4 = createObject(11480, -2166.94604, 293.80002, 38.092, 0, 0, 90) setElementDimension (huette1, i) setElementDimension (huette2, i) setElementDimension (huette3, i) setElementDimension (huette4, i) end Dude, you havent got event handler (Sry if u didnt post the full script.)
ertlflorian1 Posted March 23, 2013 Author Posted March 23, 2013 This is my full script!! addEventHandler ("onResourceStart", getResourceRootElement(), function () for i = 0,65534, 1 do local huette1 = createObject(11480, -2160.70508, 293.80402, 38.067, 0, 0, 90) local huette2 = createObject(11480, -2160.72998, 293.80002, 34.292, 0, 180, 270) --local huette1 = createObject(11319, -2170.10791, 293.772, 35.398, 0, 0, 0) local huette3 = createObject(11480, -2166.94702, 293.80099, 34.292, 0, 180, 270) local huette4 = createObject(11480, -2166.94604, 293.80002, 38.092, 0, 0, 90) setElementDimension (huette1, i) setElementDimension (huette2, i) setElementDimension (huette3, i) setElementDimension (huette4, i) end end)
ixjf Posted March 23, 2013 Posted March 23, 2013 Why it dont work? for i = 0,65535, 1 do local huette1 = createObject(11480, -2160.70508, 293.80402, 38.067, 0, 0, 90) local huette2 = createObject(11480, -2160.72998, 293.80002, 34.292, 0, 180, 270) --local huette1 = createObject(11319, -2170.10791, 293.772, 35.398, 0, 0, 0) local huette3 = createObject(11480, -2166.94702, 293.80099, 34.292, 0, 180, 270) local huette4 = createObject(11480, -2166.94604, 293.80002, 38.092, 0, 0, 90) setElementDimension (huette1, i) setElementDimension (huette2, i) setElementDimension (huette3, i) setElementDimension (huette4, i) end Dude, you havent got event handler (Sry if u didnt post the full script.) Why is an event needed here? The code is executed as soon as it is loaded. I used to know how to code, but then I took an arrow in the knee. Project Redivivus - Remaking Old School MTA With New Code MTA 0.6 Nightly 1 released
ertlflorian1 Posted March 23, 2013 Author Posted March 23, 2013 Can you tell me howto fix this error?
Sparrow Posted March 23, 2013 Posted March 23, 2013 you want to set the objects on random dimension? if so, use this: local huette1 = createObject(11480, -2160.70508, 293.80402, 38.067, 0, 0, 90) local huette2 = createObject(11480, -2160.72998, 293.80002, 34.292, 0, 180, 270) --local huette1 = createObject(11319, -2170.10791, 293.772, 35.398, 0, 0, 0) local huette3 = createObject(11480, -2166.94702, 293.80099, 34.292, 0, 180, 270) local huette4 = createObject(11480, -2166.94604, 293.80002, 38.092, 0, 0, 90) setElementDimension (huette1, math.random(0,65535)) setElementDimension (huette2, math.random(0,65535)) setElementDimension (huette3, math.random(0,65535)) setElementDimension (huette4, math.random(0,65535))
ertlflorian1 Posted March 23, 2013 Author Posted March 23, 2013 NO this objects must be createt in all dimensions
manve1 Posted March 23, 2013 Posted March 23, 2013 addEventHandler ("onResourceStart", getResourceRootElement(), function () huette1 = createObject(11480, -2160.70508, 293.80402, 38.067, 0, 0, 90) huette2 = createObject(11480, -2160.72998, 293.80002, 34.292, 0, 180, 270) --local huette1 = createObject(11319, -2170.10791, 293.772, 35.398, 0, 0, 0) huette3 = createObject(11480, -2166.94702, 293.80099, 34.292, 0, 180, 270) huette4 = createObject(11480, -2166.94604, 293.80002, 38.092, 0, 0, 90) end ) for i = 0,65534 do setElementDimension (huette1, i) setElementDimension (huette2, i) setElementDimension (huette3, i) setElementDimension (huette4, i) end Looking for tutorials or information? check out: www.simpleask.co.uk
Castillo Posted March 23, 2013 Posted March 23, 2013 That won't set it on all these dimensions, it only can be on one dimension at a time. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
ertlflorian1 Posted March 23, 2013 Author Posted March 23, 2013 And how i can create createObject(11480, -2160.70508, 293.80402, 38.067, 0, 0, 90) createObject(11480, -2160.72998, 293.80002, 34.292, 0, 180, 270) createObject(11480, -2166.94702, 293.80099, 34.292, 0, 180, 270) createObject(11480, -2166.94604, 293.80002, 38.092, 0, 0, 90) in every dimension=?
iPrestege Posted March 23, 2013 Posted March 23, 2013 You can do some thing like that : setElementDimension (huette1,getElementDimension(source)) ??
Castillo Posted March 23, 2013 Posted March 23, 2013 You could set the dimension when the player dimension changes. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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