#Al-Ha[J]aRii Posted May 20, 2013 Posted May 20, 2013 hi guys I want get skin name from model I make table because i'am making grid list im search wiki and doesn't got like this getSkinNameFromModel
Castillo Posted May 20, 2013 Posted May 20, 2013 You must create a table and specify each name for each model, you could get the names from the freeroam game mode.
#Al-Ha[J]aRii Posted May 20, 2013 Author Posted May 20, 2013 You must create a table and specify each name for each model, you could get the names from the freeroam game mode. did I need xml for skin becuase freeroam skin it's xml file ?
Castillo Posted May 20, 2013 Posted May 20, 2013 You could use the same XML file and load them content into a lua table.
iPrestege Posted May 21, 2013 Posted May 21, 2013 You can use this function engineGetModelNameFromID This function doesn't work with a Skins .
#Al-Ha[J]aRii Posted May 21, 2013 Author Posted May 21, 2013 You could use the same XML file and load them content into a lua table. controls = { { 'lst', id='skinlist', width=230, height=290, columns={ {text='Skin', attr='name'} }, rows={xml='skins.xml', attrs={'id', 'name'}}, onitemclick=showSkinID, onitemdoubleclick=applySkin }, {'txt', id='skinid', text='', width=50}, {'btn', id='set', onclick=applySkin}, {'btn', id='close', closeswindow=true} }, I wil take this ? and this is my code grid list function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(1052, 184, 314, 510, "..:: [ Selection Skin's ] ::..", false) guiWindowSetSizable(wnd, false) centerWindow(wnd) guiSetAlpha(wnd, 1.00) guiWindowSetMovable( wnd , false ) gridlist = guiCreateGridList(21, 29, 283, 426, false, wnd) guiGridListAddColumn(gridlist, "Skin", 0.9) button = guiCreateButton(85, 465, 156, 35, "Spawn !", false, wnd) guiSetProperty(button, "NormalTextColour", "FFAAAAAA") end )function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(1052, 184, 314, 510, "..:: [ Selection Skin's ] ::..", false) guiWindowSetSizable(wnd, false) centerWindow(wnd) guiSetAlpha(wnd, 1.00) guiWindowSetMovable( wnd , false ) gridlist = guiCreateGridList(21, 29, 283, 426, false, wnd) guiGridListAddColumn(gridlist, "Skin", 0.9) button = guiCreateButton(85, 465, 156, 35, "Spawn !", false, wnd) guiSetProperty(button, "NormalTextColour", "FFAAAAAA") end )
Castillo Posted May 21, 2013 Posted May 21, 2013 You could use the same XML file and load them content into a lua table. controls = { { 'lst', id='skinlist', width=230, height=290, columns={ {text='Skin', attr='name'} }, rows={xml='skins.xml', attrs={'id', 'name'}}, onitemclick=showSkinID, onitemdoubleclick=applySkin }, {'txt', id='skinid', text='', width=50}, {'btn', id='set', onclick=applySkin}, {'btn', id='close', closeswindow=true} }, I wil take this ? and this is my code grid list function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(1052, 184, 314, 510, "..:: [ Selection Skin's ] ::..", false) guiWindowSetSizable(wnd, false) centerWindow(wnd) guiSetAlpha(wnd, 1.00) guiWindowSetMovable( wnd , false ) gridlist = guiCreateGridList(21, 29, 283, 426, false, wnd) guiGridListAddColumn(gridlist, "Skin", 0.9) button = guiCreateButton(85, 465, 156, 35, "Spawn !", false, wnd) guiSetProperty(button, "NormalTextColour", "FFAAAAAA") end )function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(1052, 184, 314, 510, "..:: [ Selection Skin's ] ::..", false) guiWindowSetSizable(wnd, false) centerWindow(wnd) guiSetAlpha(wnd, 1.00) guiWindowSetMovable( wnd , false ) gridlist = guiCreateGridList(21, 29, 283, 426, false, wnd) guiGridListAddColumn(gridlist, "Skin", 0.9) button = guiCreateButton(85, 465, 156, 35, "Spawn !", false, wnd) guiSetProperty(button, "NormalTextColour", "FFAAAAAA") end ) You got me wrong, I told you to use the XML file only, not the freeroam script. Use the XML functions to load the content of the XML into a lua table, then you can create a function which will get the skin name from the model.
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