Tails Posted August 12, 2012 Share Posted August 12, 2012 So this is what I have so far. I used the guieditor addon and then I added the script to my marker hit script. So I already got that going, I hit the marker and the window pops up. Now how would I go about making it so the player get to actually choose their skin rather than just a window with nothing in it. I already made the base with the guieditor addon. I'd appreciate it if you could help me with this. function MarkerHit ( thePlayer, matchingDimension ) local elementType = getElementType ( thePlayer ) if ( elementType == "player" and not isPedInVehicle ( thePlayer ) ) then if ( source == skinMarker ) then GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.0175,0.2783,0.2387,0.465,"Choose your Skin",true) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(0.0471,0.086,0.9058,0.7778,true,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Skins",0.2) showCursor (true,true) for i = 1, 16 do guiGridListAddRow(GUIEditor_Grid[1]) end GUIEditor_Button[1] = guiCreateButton(0.356,0.8817,0.2984,0.0896,"OK",true,GUIEditor_Window[1]) end end end addEventHandler ( "onClientMarkerHit", root, MarkerHit ) Thanks in advance. Link to comment
micheal1230 Posted August 13, 2012 Share Posted August 13, 2012 So this is what I have so far. I used the guieditor addon and then I added the script to my marker hit script.So I already got that going, I hit the marker and the window pops up. Now how would I go about making it so the player get to actually choose their skin rather than just a window with nothing in it. I already made the base with the guieditor addon. I'd appreciate it if you could help me with this. function MarkerHit ( thePlayer, matchingDimension ) local elementType = getElementType ( thePlayer ) if ( elementType == "player" and not isPedInVehicle ( thePlayer ) ) then if ( source == skinMarker ) then GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.0175,0.2783,0.2387,0.465,"Choose your Skin",true) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(0.0471,0.086,0.9058,0.7778,true,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Skins",0.2) showCursor (true,true) for i = 1, 16 do guiGridListAddRow(GUIEditor_Grid[1]) end GUIEditor_Button[1] = guiCreateButton(0.356,0.8817,0.2984,0.0896,"OK",true,GUIEditor_Window[1]) end end end addEventHandler ( "onClientMarkerHit", root, MarkerHit ) Thanks in advance. Add all the skins into the GUI Grid then when the player clicks the the gridlist item they want (skin) and click ok it uses the Gridlist value to set skin to the player Link to comment
Tails Posted August 14, 2012 Author Share Posted August 14, 2012 How exactly do I add the skins to the list? 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