Deepu Posted March 23, 2014 Share Posted March 23, 2014 Hey can any pro guy tell me how I can make a gang with lua? Like, Hooligans gang or Full of pain gang? Also if the gang is within col shape then how to get group colour? And how to save group's turfs? Please answer these questions with a detailed explanation please Link to comment
Castillo Posted March 23, 2014 Share Posted March 23, 2014 Well, to start with, MTA doesn't have "gang" or "turf" functions, you gotta make everything yourself. Link to comment
Deepu Posted March 23, 2014 Author Share Posted March 23, 2014 ok but can you tell me how? I have made col shapes and radar areas. Link to comment
HerculePoirot Posted March 23, 2014 Share Posted March 23, 2014 You can use tables to make gangs and use radar functions for creating turfs. Link to comment
Deepu Posted March 23, 2014 Author Share Posted March 23, 2014 uhmmm well if I use tables then how can I connect it to a function? How can I make a group with those tables? for example: diskHead = { {Hooligans} {expendables} {full of pain} } now How will I make a group with that gang list? Link to comment
Anubhav Posted March 23, 2014 Share Posted March 23, 2014 (edited) Agree to create col shape and radar area's with hercule. You need to make exports something like: function getGangTurfColor() local lop = getElementData(player,"group") for k,v in ipairs(lop) do return getElementData(group,"gangColor") end end gangColor's value should be in R,G,B I suggest. The players group's value should be his group name. EDIT: Your tables are wrong. diskHead = {} function createGroup(name,...) local name = table.concat({...},"") local owner = getPlayerName(source) if name then diskHead[name] = tostring (owner) end addCommandHandler("creategroup",createGroup) Edited March 23, 2014 by Guest Link to comment
Anubhav Posted March 23, 2014 Share Posted March 23, 2014 Edited the post. Sorry i forgot a end in last. EDIT: You can loop through the table for list. Link to comment
cheez3d Posted March 23, 2014 Share Posted March 23, 2014 Agree to create col shape and radar area's with hercule. You need to make exports something like: function getGangTurfColor() local lop = getElementData(player,"group") for k,v in ipairs(lop) do return getElementData(group,"gangColor") end end gangColor's value should be in R,G,B I suggest. The players group's value should be his group name. EDIT: Your tables are wrong. diskHead = {} function createGroup(name,...) local name = table.concat({...},"") local owner = getPlayerName(source) if name then diskHead[name] = tostring (owner) end addCommandHandler("creategroup",createGroup) Your code doesn't make any sense at all. Please don't post here if you don't know what you're talking about. You misguide the player that is asking for help. Link to comment
HerculePoirot Posted March 23, 2014 Share Posted March 23, 2014 I suggest that you use sql databases to have a list of gangs, use setAccountData for a player to be in a gang and you can also use sql database for associating gangs with their respective colors. Link to comment
Deepu Posted March 23, 2014 Author Share Posted March 23, 2014 ok but I don't understand the wiki explanation of db functions.... Link to comment
Anubhav Posted March 23, 2014 Share Posted March 23, 2014 When i saw first time I also din't. But i think tables or account data can help you alot. Link to comment
cheez3d Posted March 23, 2014 Share Posted March 23, 2014 You should learn SQL before you jump into databases. If you consider it too hard then just stick to account data. Link to comment
HerculePoirot Posted March 23, 2014 Share Posted March 23, 2014 I suggest you to read wikipedia about what are sql queries etc.. and then look at mta db functions. Link to comment
Deepu Posted March 23, 2014 Author Share Posted March 23, 2014 (edited) your table was empty. How would an empty table be useful Anu? or the empty table is edit area? and can you tell me how can I save turfs of a particular gang with account data? also if possible can you tell me how many turfs should be made in LV? Cheezed can you answer these? Edited March 23, 2014 by Guest Link to comment
Anubhav Posted March 23, 2014 Share Posted March 23, 2014 omg... Table will store info when someone will create group with /creategroup. CHECK YOUR SKYPE/ Link to comment
Deepu Posted March 23, 2014 Author Share Posted March 23, 2014 I blocked you when you quit send contact request. 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