Akam Posted June 15, 2013 Share Posted June 15, 2013 Hi! I want to know if it is possible to script a meta so i dont need to type file src= for every object i got in the resource because i found a cinema resource and the resource uses frames so if i want to make a video i need to type file src= over a 100 times like and is it possible to just edit the resource so it play movies on the screen please help. [NOTE]link to resource here: https://community.multitheftauto.com/ind ... ls&id=4600 Link to comment
blehmeh Posted June 15, 2013 Share Posted June 15, 2013 I once had such problem, I made a loop using Lua to output the whole meta to a file. Link to comment
Akam Posted June 15, 2013 Author Share Posted June 15, 2013 I once had such problem, I made a loop using Lua to output the whole meta to a file. how ? Link to comment
PaiN^ Posted June 15, 2013 Share Posted June 15, 2013 Use XML functions You can find theme in the wiki Link to comment
Akam Posted June 15, 2013 Author Share Posted June 15, 2013 Use XML functionsYou can find theme in the wiki i cant script so it would be more helpful to say which functions or how Link to comment
blehmeh Posted June 15, 2013 Share Posted June 15, 2013 for i = 0, 100 do outputConsole('tostring(i)..'.jpg"/>') end This will output to console: From 1 to 100, you can increase the count by changing the number 100 in the script. Link to comment
Akam Posted June 16, 2013 Author Share Posted June 16, 2013 for i = 0, 100 do outputConsole('tostring(i)..'.jpg"/>') end This will output to console: From 1 to 100, you can increase the count by changing the number 100 in the script. how does this work? should i just create a new lua and paste it inside the lua? Link to comment
Akam Posted June 16, 2013 Author Share Posted June 16, 2013 for i = 0, 100 do outputConsole('tostring(i)..'.jpg"/>') end This will output to console: From 1 to 100, you can increase the count by changing the number 100 in the script. how does this work? should i just create a new lua and paste it inside the lua? Nobody that can help? Link to comment
PaiN^ Posted June 16, 2013 Share Posted June 16, 2013 addCommandHandler( "output", function( ) for i = 0, 100 do outputConsole('tostring(i)..'.jpg"/>') end end ) Type "output" at the console Link to comment
iPrestege Posted June 16, 2013 Share Posted June 16, 2013 addCommandHandler( "output", function( ) for i = 0, 100 do outputConsole('tostring(i)..'.jpg"/>') end end ) Type "output" at the console Waba's code should work without a handler it works when the resource start. Link to comment
Akam Posted June 16, 2013 Author Share Posted June 16, 2013 addCommandHandler( "output", function( ) for i = 0, 100 do outputConsole('tostring(i)..'.jpg"/>') end end ) Type "output" at the console Waba's code should work without a handler it works when the resource start. try the resource yourself with the script, so you know how the resource works. because this stuff doesn't work i appreciate your help guys Link to comment
iPrestege Posted June 16, 2013 Share Posted June 16, 2013 addCommandHandler( "output", function( ) for i = 0, 100 do outputConsole('tostring(i)..'.jpg"/>') end end ) Type "output" at the console Waba's code should work without a handler it works when the resource start. try the resource yourself with the script, so you know how the resource works. because this stuff doesn't work i appreciate your help guys Work's fine : src="0.jpg"/>src="1.jpg"/>src="2.jpg"/>src="3.jpg"/>src="4.jpg"/>src="5.jpg"/>src="6.jpg"/>src="7.jpg"/>src="8.jpg"/>src="9.jpg"/>src="10.jpg"/>src="11.jpg"/>src="12.jpg"/>src="13.jpg"/>src="14.jpg"/>src="15.jpg"/>src="16.jpg"/>src="17.jpg"/>src="18.jpg"/>src="19.jpg"/>src="20.jpg"/>src="21.jpg"/>src="22.jpg"/>src="23.jpg"/>src="24.jpg"/>src="25.jpg"/>src="26.jpg"/>src="27.jpg"/>src="28.jpg"/>src="29.jpg"/>src="30.jpg"/>src="31.jpg"/>src="32.jpg"/>src="33.jpg"/>src="34.jpg"/>src="35.jpg"/>src="36.jpg"/>src="37.jpg"/>src="38.jpg"/>src="39.jpg"/>src="40.jpg"/>src="41.jpg"/>src="42.jpg"/>src="43.jpg"/>src="44.jpg"/>src="45.jpg"/>src="46.jpg"/>src="47.jpg"/>src="48.jpg"/>src="49.jpg"/>src="50.jpg"/>src="51.jpg"/>src="52.jpg"/>src="53.jpg"/>src="54.jpg"/>src="55.jpg"/>src="56.jpg"/>src="57.jpg"/>src="58.jpg"/>src="59.jpg"/>src="60.jpg"/>src="61.jpg"/>src="62.jpg"/>src="63.jpg"/>src="64.jpg"/>src="65.jpg"/>src="66.jpg"/>src="67.jpg"/>src="68.jpg"/>src="69.jpg"/>src="70.jpg"/>src="71.jpg"/>src="72.jpg"/>src="73.jpg"/>src="74.jpg"/>src="75.jpg"/>src="76.jpg"/>src="77.jpg"/>src="78.jpg"/>src="79.jpg"/>src="80.jpg"/>src="81.jpg"/>src="82.jpg"/>src="83.jpg"/>src="84.jpg"/>src="85.jpg"/>src="86.jpg"/>src="87.jpg"/>src="88.jpg"/>src="89.jpg"/>src="90.jpg"/>src="91.jpg"/>src="92.jpg"/>src="93.jpg"/>src="94.jpg"/>src="95.jpg"/>src="96.jpg"/>src="97.jpg"/>src="98.jpg"/>src="99.jpg"/>src="100.jpg"/> You're welcome. Link to comment
Akam Posted June 16, 2013 Author Share Posted June 16, 2013 Work's fine : src="0.jpg"/>src="1.jpg"/>src="2.jpg"/>src="3.jpg"/>src="4.jpg"/>src="5.jpg"/>src="6.jpg"/>src="7.jpg"/>src="8.jpg"/>src="9.jpg"/>src="10.jpg"/>src="11.jpg"/>src="12.jpg"/>src="13.jpg"/>src="14.jpg"/>src="15.jpg"/>src="16.jpg"/>src="17.jpg"/>src="18.jpg"/>src="19.jpg"/>src="20.jpg"/>src="21.jpg"/>src="22.jpg"/>src="23.jpg"/>src="24.jpg"/>src="25.jpg"/>src="26.jpg"/>src="27.jpg"/>src="28.jpg"/>src="29.jpg"/>src="30.jpg"/>src="31.jpg"/>src="32.jpg"/>src="33.jpg"/>src="34.jpg"/>src="35.jpg"/>src="36.jpg"/>src="37.jpg"/>src="38.jpg"/>src="39.jpg"/>src="40.jpg"/>src="41.jpg"/>src="42.jpg"/>src="43.jpg"/>src="44.jpg"/>src="45.jpg"/>src="46.jpg"/>src="47.jpg"/>src="48.jpg"/>src="49.jpg"/>src="50.jpg"/>src="51.jpg"/>src="52.jpg"/>src="53.jpg"/>src="54.jpg"/>src="55.jpg"/>src="56.jpg"/>src="57.jpg"/>src="58.jpg"/>src="59.jpg"/>src="60.jpg"/>src="61.jpg"/>src="62.jpg"/>src="63.jpg"/>src="64.jpg"/>src="65.jpg"/>src="66.jpg"/>src="67.jpg"/>src="68.jpg"/>src="69.jpg"/>src="70.jpg"/>src="71.jpg"/>src="72.jpg"/>src="73.jpg"/>src="74.jpg"/>src="75.jpg"/>src="76.jpg"/>src="77.jpg"/>src="78.jpg"/>src="79.jpg"/>src="80.jpg"/>src="81.jpg"/>src="82.jpg"/>src="83.jpg"/>src="84.jpg"/>src="85.jpg"/>src="86.jpg"/>src="87.jpg"/>src="88.jpg"/>src="89.jpg"/>src="90.jpg"/>src="91.jpg"/>src="92.jpg"/>src="93.jpg"/>src="94.jpg"/>src="95.jpg"/>src="96.jpg"/>src="97.jpg"/>src="98.jpg"/>src="99.jpg"/>src="100.jpg"/> You're welcome. how did you do that O_o? Link to comment
iPrestege Posted June 16, 2013 Share Posted June 16, 2013 As i said above use waba's code but you ignored my post. Link to comment
Akam Posted June 16, 2013 Author Share Posted June 16, 2013 Waba's code should work without a handler it works when the resource start. try the resource yourself with the script, so you know how the resource works. because this stuff doesn't work i appreciate your help guys Work's fine : src="0.jpg"/>src="1.jpg"/>src="2.jpg"/>src="3.jpg"/>src="4.jpg"/>src="5.jpg"/>src="6.jpg"/>src="7.jpg"/>src="8.jpg"/>src="9.jpg"/>src="10.jpg"/>src="11.jpg"/>src="12.jpg"/>src="13.jpg"/>src="14.jpg"/>src="15.jpg"/>src="16.jpg"/>src="17.jpg"/>src="18.jpg"/>src="19.jpg"/>src="20.jpg"/>src="21.jpg"/>src="22.jpg"/>src="23.jpg"/>src="24.jpg"/>src="25.jpg"/>src="26.jpg"/>src="27.jpg"/>src="28.jpg"/>src="29.jpg"/>src="30.jpg"/>src="31.jpg"/>src="32.jpg"/>src="33.jpg"/>src="34.jpg"/>src="35.jpg"/>src="36.jpg"/>src="37.jpg"/>src="38.jpg"/>src="39.jpg"/>src="40.jpg"/>src="41.jpg"/>src="42.jpg"/>src="43.jpg"/>src="44.jpg"/>src="45.jpg"/>src="46.jpg"/>src="47.jpg"/>src="48.jpg"/>src="49.jpg"/>src="50.jpg"/>src="51.jpg"/>src="52.jpg"/>src="53.jpg"/>src="54.jpg"/>src="55.jpg"/>src="56.jpg"/>src="57.jpg"/>src="58.jpg"/>src="59.jpg"/>src="60.jpg"/>src="61.jpg"/>src="62.jpg"/>src="63.jpg"/>src="64.jpg"/>src="65.jpg"/>src="66.jpg"/>src="67.jpg"/>src="68.jpg"/>src="69.jpg"/>src="70.jpg"/>src="71.jpg"/>src="72.jpg"/>src="73.jpg"/>src="74.jpg"/>src="75.jpg"/>src="76.jpg"/>src="77.jpg"/>src="78.jpg"/>src="79.jpg"/>src="80.jpg"/>src="81.jpg"/>src="82.jpg"/>src="83.jpg"/>src="84.jpg"/>src="85.jpg"/>src="86.jpg"/>src="87.jpg"/>src="88.jpg"/>src="89.jpg"/>src="90.jpg"/>src="91.jpg"/>src="92.jpg"/>src="93.jpg"/>src="94.jpg"/>src="95.jpg"/>src="96.jpg"/>src="97.jpg"/>src="98.jpg"/>src="99.jpg"/>src="100.jpg"/> You're welcome. no i didnt ignore but i need to know how this works to use it how does this work? does this make a new file that has file src= from 1 to 100 or what? Link to comment
iPrestege Posted June 16, 2013 Share Posted June 16, 2013 You have learn scripting : Introduction to Scripting . Link to comment
Akam Posted June 16, 2013 Author Share Posted June 16, 2013 You have learn scripting : Introduction to Scripting . ._. you didnt answer my question does this make a new file with scr from 1 to 100? and i just use the script alone then it says expcted near end Link to comment
iPrestege Posted June 16, 2013 Share Posted June 16, 2013 No it's not it's just output this 100 time . Link to comment
Akam Posted June 16, 2013 Author Share Posted June 16, 2013 No it's not it's just output this 100 time . what about the eof error? Link to comment
iPrestege Posted June 16, 2013 Share Posted June 16, 2013 You can add it by yourself . Link to comment
Akam Posted June 16, 2013 Author Share Posted June 16, 2013 You can add it by yourself . it this right? for i = 0, 100 do outputConsole('<file src="'..tostring(i)..'.jpg"/>') <eof> end end Link to comment
Akam Posted June 16, 2013 Author Share Posted June 16, 2013 You can add it by yourself . sometimes i am just dumb ._. i dont know why maybe cuz i havent slept but thanks got it working your the best :) 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