Wisam Posted March 12, 2016 Posted March 12, 2016 Hey guys, so i've been learning coding for a while and everything is going well i learned really good i can now build guis and link server functions to them and lots of stuff, but now im going to learn the table.. i want to know the structure of the table how to build it and what types of tables i can do and how to link them to functions, if you would like to help me please just post usefull functions or small examples of tables that'd be great ☣ Plauge Arma II DayZ Mod Server ☣ Here's the link to stay tuned with the server progress and features: https://forum.mtasa.com/viewtopic.php?f=114&t=96675 Get Ready to play DayZ like you never did before
dugasz1 Posted March 12, 2016 Posted March 12, 2016 http://www.lua.org/pil/2.5.html -- Table http://www.tutorialspoint.com/lua/lua_tables.htm -- Table http://www.tutorialspoint.com/lua/lua_arrays.htm -- Array (basically table in table) Just read these. I think its enough to understand. Sorry for lot of questions and thanks for the answers!
Wisam Posted March 13, 2016 Author Posted March 13, 2016 http://www.lua.org/pil/2.5.html -- Table http://www.tutorialspoint.com/lua/lua_tables.htm -- Table http://www.tutorialspoint.com/lua/lua_arrays.htm -- Array (basically table in table) Just read these. I think its enough to understand. Thank you mate its helpful, can you just put an example here of a simple table ☣ Plauge Arma II DayZ Mod Server ☣ Here's the link to stay tuned with the server progress and features: https://forum.mtasa.com/viewtopic.php?f=114&t=96675 Get Ready to play DayZ like you never did before
Wisam Posted June 8, 2016 Author Posted June 8, 2016 . ☣ Plauge Arma II DayZ Mod Server ☣ Here's the link to stay tuned with the server progress and features: https://forum.mtasa.com/viewtopic.php?f=114&t=96675 Get Ready to play DayZ like you never did before
Bean666 Posted June 8, 2016 Posted June 8, 2016 here is an example of a marker table when you add more arrays , don't forgot to add at the end of the arrays with , but don't add , in the last array! local markers = { { x, y, z }, { x, y, z } } for i,v in ipairs( markers ) do createMarker ( v[1],v[2],v[3], type/kind, size, r, g, b, a ) end Aftermath
Anubhav Posted June 9, 2016 Posted June 9, 2016 (edited) Or this: local stuff = {} stuff[1] = {1, 2, 3} stuff['proThingBro'] = {131931,3131,13131} for i, v in pairs( stuff ) do local string = tostring( v[1] ) ..","..tostring( v[2] )..","..tostring( v[3] ) outputChatBox( string ) end They're very useful for many things. You can use them for complicated stuff too, and they also are fast. Edited June 10, 2016 by Guest See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Bean666 Posted June 10, 2016 Posted June 10, 2016 Or this: local stuff = {} stuff[1] = {1, 2, 3} stuff['proThingBro'] = {131931,3131,13131"} for i, v in pairs( stuff ) do local string = v[1]..","..v[2]..","..v[3] outputChatBox( string ) end They're very useful for many things. You can use them for complicated stuff too, and they also are fast. is that an unfinished string or it's normal? 131931,3131,13131" Aftermath
Walid Posted June 10, 2016 Posted June 10, 2016 Check my Tuto Lua Tables Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Enargy, Posted June 10, 2016 Posted June 10, 2016 Or this: local stuff = {} stuff[1] = {1, 2, 3} stuff['proThingBro'] = {131931,3131,13131"} for i, v in pairs( stuff ) do local string = v[1]..","..v[2]..","..v[3] outputChatBox( string ) end They're very useful for many things. You can use them for complicated stuff too, and they also are fast. is that an unfinished string or it's normal? 131931,3131,13131" Of couse it does not normal. - Inactivo.
Anubhav Posted June 10, 2016 Posted June 10, 2016 Or this: local stuff = {} stuff[1] = {1, 2, 3} stuff['proThingBro'] = {131931,3131,13131"} for i, v in pairs( stuff ) do local string = v[1]..","..v[2]..","..v[3] outputChatBox( string ) end They're very useful for many things. You can use them for complicated stuff too, and they also are fast. is that an unfinished string or it's normal? 131931,3131,13131" my bad. thanks See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Wisam Posted June 10, 2016 Author Posted June 10, 2016 Thanks alot guys, that was really helpful im improving ☣ Plauge Arma II DayZ Mod Server ☣ Here's the link to stay tuned with the server progress and features: https://forum.mtasa.com/viewtopic.php?f=114&t=96675 Get Ready to play DayZ like you never did before
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