Max+ Posted April 5, 2013 Posted April 5, 2013 Hello Guys Iam not Good in Tables, i want to make a selection of skins and then spawn Just like Sa:mp selection skin then spawn ? with buttons Right - Left - Spawn . can some one show me an example ? - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
tosfera Posted April 5, 2013 Posted April 5, 2013 Making a table isn't that hard, all I know is that a table is the same as an array. The most usefull thing to do is in your situation is to create a double array (array in an array). skins = { { "skinid", "skin desc" } , { "skinid","skin desc" } }; Then use a loop to get all the skins, and a math.rand to start off with. After that, just bind the left and right button/arrow keys to make it go to the next index of the array. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
DNL291 Posted April 5, 2013 Posted April 5, 2013 skins = { { "skinid", "skin desc" } , { "skinid","skin desc" } }; Skin id is a numeric value not a string. Use local variables. Please do not PM me with scripting related question nor support, use the forums instead.
Max+ Posted April 5, 2013 Author Posted April 5, 2013 i dont mean skins table i mean how to make Spawn Manger with Buttons , if resource start show 3 buttons < -- Go -- > if be press -- > then +1 skin if < -- then -1 skin go = spawn in spawn points , Just like Sa:Mp skin selector , - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
iPrestege Posted April 5, 2013 Posted April 5, 2013 There's no need to use table ._. just use : createPed setElementFrozen setPedAnimation guiCreateButton or bindKey setElementModel
Max+ Posted April 5, 2013 Author Posted April 5, 2013 OK , Thank's I'm going to Try it , - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
iPrestege Posted April 5, 2013 Posted April 5, 2013 No problem if you have problem with anything post it here and we will help you .
Max+ Posted April 5, 2013 Author Posted April 5, 2013 No problem if you have problem with anything post it here and we will help you . I really appreciate your help, - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
Max+ Posted April 5, 2013 Author Posted April 5, 2013 is it possible to make a table with gui Buttons ? and how ? - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
iPrestege Posted April 5, 2013 Posted April 5, 2013 Yes you can do that like this : local ID = { [1] = {x,y,width,height,"Test[1]"}, [2] = {x,y,width,height,"Test[2]"} } for _,v in ipairs ( ID ) do Button = guiCreateButton(v[1],v[2],v[3],v[4],v[5],false) end Remember "relative" or not "true > false"
Max+ Posted April 5, 2013 Author Posted April 5, 2013 Iam understanding Tables Thank's to You Fahode , But if i want table for onClientGUIClick ? - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
iPrestege Posted April 5, 2013 Posted April 5, 2013 I dont think that you can do it because it's something hard i dont think that i can do it but also i dont think any one can do it ._. because it's a Variables "Button" how can any one do it ._.? i dkn .
Max+ Posted April 5, 2013 Author Posted April 5, 2013 lol, iam Going to Try doing it , and add it to Useful function lol , - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
Max+ Posted April 5, 2013 Author Posted April 5, 2013 (edited) This is My Buttons it debug of mta script edtor i tryed close the tabel but i cant, local ID = { [1] = [1.30,1.22,5,20,"<<<-"] [2] = [2.90,1.22,5,20,"->>>"] [3] = [1.80,1.22,5,20,"Ready!"] Now My GameMode it's 60% Tabels , it's Better, Edited April 5, 2013 by Guest - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
Max+ Posted April 5, 2013 Author Posted April 5, 2013 I mean the Buttons Table i show you in the debug i must close the Table go to mta script edtor and paste my Buttons Table and see the debug, - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
iPrestege Posted April 5, 2013 Posted April 5, 2013 Maybe you can do some thing like : local xxx = guiGetText(Button) if xxx == "Test[1]" then -- do some fuck end;
Max+ Posted April 5, 2013 Author Posted April 5, 2013 Never Mined i will Talk to SolidSnake14, - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
Ludo Posted April 5, 2013 Posted April 5, 2013 localID = { {1.30,1.22,5,20,"<<<-"}, {2.90,1.22,5,20,"->>>"}, {1.80,1.22,5,20,"Ready!"} } You have to put a "," after a row of a table. Anyway you must use {} to define a table with multiple values, as you can get it with double table pointer: for i, value in ipairs(localID) do guiCreateButton(localID[value][1], localID[value][2], localID[value][3], localID[value][4], localID[value][5], false) -- I copied Mr.Pres[T]ege's post values, but you can edit them end
Max+ Posted April 6, 2013 Author Posted April 6, 2013 Ok Thank's Ludo , i Hope i finsh My GameMode Lol, - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
Ludo Posted April 6, 2013 Posted April 6, 2013 Ok Thank's Ludo ,i Hope i finsh My GameMode Lol, You are welcome Good luck with your gamemode!
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