HealthDown Posted September 8, 2011 Share Posted September 8, 2011 can someone help me with skin shop and script me an example, i beg you. GUI: guiSkinShop = guiCreateWindow(284,179,245,307,"Skin Shop",false) guiSetAlpha(guiSkinShop,1) guiSkinShopGridlist = guiCreateGridList(10,29,223,234,false,guiSkinShop) guiGridListSetSelectionMode(guiSkinShopGridlist,2) guiGridListAddColumn(guiSkinShopGridlist,"Skins",0.2) guiSkinShopBuy = guiCreateButton(11,270,68,27,"Buy ($200)",false,guiSkinShop) guiSkinShopClose = guiCreateButton(164,270,68,27,"Close",false,guiSkinShop) i am not lazy to make myself, but whenever i script i get tons of bugs what noone can fix (even on this forum) so can you just make me an example and i will add skins by myself Link to comment
JR10 Posted September 8, 2011 Share Posted September 8, 2011 Fill the gridlist with the skins, and onClick, get the selected item text, and set the skin to it. Try doing that yourself, if you can't maybe take a look at this: https://wiki.multitheftauto.com/wiki/Scr ... Tutorial_1 Link to comment
bandi94 Posted September 8, 2011 Share Posted September 8, 2011 use local guiSkinShop = guiCreateWindow(284,179,245,307,"Skin Shop",false) local guiSetAlpha(guiSkinShop,1) local guiSkinShopGridlist = guiCreateGridList(10,29,223,234,false,guiSkinShop) local guiGridListSetSelectionMode(guiSkinShopGridlist,2) local column = guiGridListAddColumn (guiSkinShopGridlist,"Skins",0.2) local guiSkinShopBuy = guiCreateButton(11,270,68,27,"Buy ($200)",false,guiSkinShop) local guiSkinShopClose = guiCreateButton(164,270,68,27,"Close",false,guiSkinShop) function list() local skins={ "1","2".........} for i,list in pairs(skins) do local row= guiGridListAddRow ( guiSkinShopGridlist ) guiGridListSetItemText ( guiSkinShopGridlist, row, column, skins[i], false, false) end end addEventHandler("onClientResourceStart",getRootElement(),list) this add the skins to the list now on button pres get the selected item text (text=id) and then set the player skin 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