6RB|AccenT Posted May 4, 2012 Share Posted May 4, 2012 hi Guys i have UserPanel How to Edit gridlist maps name My User Panel Help Me Plz Link to comment
6RB|AccenT Posted May 4, 2012 Author Share Posted May 4, 2012 i only Create Grid List How to Show Name Maps plz Help ME Link to comment
sckatchof Posted May 4, 2012 Share Posted May 4, 2012 i only Create Grid List How to Show Name Maps plz Help ME show your code to help you we can't help you without code . Link to comment
Michael# Posted May 4, 2012 Share Posted May 4, 2012 for _, map in ipairs ( exports['mapmanager']:getMapsCompatibleWithGamemode ( 'race' ) ) do local row = guiGridListAddRow ( urGridList ) guiGridListSetItemText ( urGridList, row, 1, tostring ( getResourceInfo ( map, 'name' ) ), false, false ) end Link to comment
6RB|AccenT Posted May 4, 2012 Author Share Posted May 4, 2012 this my code</p>\n<p>localPlayer = getLocalPlayer()</p>\n<p> </p>\n<p>function addColumns()</p>\n<p> exports.scoreboard:scoreboardAddColumn(\"Points\")</p>\n<p> exports.scoreboard:scoreboardAddColumn(\"Race Wins\") </p>\n<p> exports.scoreboard:scoreboardAddColumn(\"Race Loses\") </p>\n<p> setElementData(localPlayer,\"Points\",0)</p>\n<p> setElementData(localPlayer,\"Race Loses\",0)</p>\n<p> setElementData(localPlayer,\"Race Wins\",0) </p>\n<p>end</p>\n<p>addEventHandler(\"onClientResourceStart\", getResourceRootElement(getThisResource()), addColumns)</p>\n<p> </p>\n<p>outputChatBox(\"Resource Userpanel v3.3 Started! press F1 to use it!\",0,255,0)</p>\n<p>outputChatBox(\"Author: Castillo\",255,255,0)</p>\n<p> </p>\n<p>userPanelWindow = guiCreateWindow(0,4,600,430,\"Welcome To Your UserPanel, \",false)</p>\n<p>guiSetVisible(userPanelWindow,false)</p>\n<p>tabPanel = guiCreateTabPanel(9,24,600,430,false,userPanelWindow)</p>\n<p>tab1 = guiCreateTab(\"Maps\",tabPanel)</p>\n<p>mapsNameEdit = guiCreateEdit(377,40,200,29,\"\",false,tab1)</p>\n<p>mapsNickLabel = guiCreateLabel(380,17,320,18,\"Search Maps: \",false,tab1)</p>\n<p>guiLabelSetColor(mapsNickLabel,0,255,0)</p>\n<p>mapspriceLabel = guiCreateLabel(380,80,320,18,\"Price : 4000$\",false,tab1)</p>\n<p>guiLabelSetColor(mapspriceLabel,255,150,0)</p>\n<p>refreshmapButton = guiCreateButton(375,100,200,30,\"Refresh Map List\",false,tab1)</p>\n<p>mapsbyLabel = guiCreateLabel(380,140,320,18,\"UserPanel By : MiX#\",false,tab1)</p>\n<p>guiCreateStaticImage (420,180,119,100,\"img/logo.png\",false,tab1 )</p>\n<p>buynextButton = guiCreateButton(375,320,200,30,\"Buy As Next Map\",false,tab1)</p>\n<p>tab2 = guiCreateTab(\"Send Money\",tabPanel)</p>\n<p>playerNameEdit = guiCreateEdit(158,26,200,29,\"\",false,tab2)</p>\n<p>guiEditSetReadOnly(playerNameEdit,true)</p>\n<p>playerNameLabel = guiCreateLabel(197,6,73,15,\"Target Player:\",false,tab2)</p>\n<p>guiLabelSetColor(playerNameLabel,255,130,0)</p>\n<p>guiLabelSetVerticalAlign(playerNameLabel,\"top\")</p>\n<p>guiLabelSetHorizontalAlign(playerNameLabel,\"left\",false)</p>\n<p>amountEdit = guiCreateEdit(158,84,200,29,\"\",false,tab2)</p>\n<p>guiEditSetMaxLength(amountEdit,5)</p>\n<p>amountLabel = guiCreateLabel(196,60,73,15,\"Amount:\",false,tab2)</p>\n<p>guiLabelSetColor(amountLabel,255,130,0)</p>\n<p>guiLabelSetVerticalAlign(amountLabel,\"top\")</p>\n<p>guiLabelSetHorizontalAlign(amountLabel,\"left\",false)</p>\n<p>sendMoneyButton = guiCreateButton(193,134,84,39,\"Send\",false,tab2)</p>\n<p>guiCreateStaticImage (420,5,160,360,\"img/logo1.png\",false,tab2 )</p>\n<p>guiCreateStaticImage (200,180,140,100,\"img/logo.png\",false,tab2 )</p>\n<p>playerNameLabel = guiCreateLabel(160,280,140,15,\"You Can Send to Other\",false,tab2)</p>\n<p>guiLabelSetColor(playerNameLabel,0,255,0)</p>\n<p>playerNameLabel = guiCreateLabel(160,300,140,15,\"Players by selecting their\",false,tab2)</p>\n<p>guiLabelSetColor(playerNameLabel,0,255,0)</p>\n<p>playerNameLabel = guiCreateLabel(160,320,220,15,\"name and then entering the amount\",false,tab2)</p>\n<p>guiLabelSetColor(playerNameLabel,0,255,0)</p>\n<p>tab3 = guiCreateTab(\"Shop\",tabPanel)</p>\n<p>Flip = guiCreateButton(17,11,61,26,\"Flip\",false,tab3)</p>\n<p>Nitro = guiCreateButton(16,46,61,26,\"Nitro\",false,tab3)</p>\n<p>GodMode = guiCreateButton(16,82,61,26,\"GodMode\",false,tab3)</p>\n<p>Haystack = guiCreateButton(15,117,61,26,\"Haystack\",false,tab3)</p>\n<p>Invisible = guiCreateButton(14,152,61,26,\"Invisible\",false,tab3)</p>\n<p>Repair = guiCreateButton(130,11,61,26,\"Repair\",false,tab3)</p>\n<p>Barrel = guiCreateButton(128,49,61,26,\"Barrel\",false,tab3)</p>\n<p>Hunter = guiCreateButton(125,83,61,26,\"Hunter\",false,tab3)</p>\n<p>Hydra = guiCreateButton(124,119,61,26,\"Hydra\",false,tab3)</p>\n<p>GodOfWar = guiCreateButton(230,13,149,26,\"God Of War\",false,tab3)</p>\n<p>TimeOfIce = guiCreateButton(230,52,149,26,\"Time Of Ice\",false,tab3)</p>\n<p>info1 = guiCreateButton(386,56,19,18,\"?\",false,tab3)</p>\n<p>info2 = guiCreateButton(387,18,19,18,\"?\",false,tab3)</p>\n<p>info3 = guiCreateButton(194,124,19,18,\"?\",false,tab3)</p>\n<p>info4 = guiCreateButton(196,87,19,18,\"?\",false,tab3)</p>\n<p>info5 = guiCreateButton(197,53,19,18,\"?\",false,tab3)</p>\n<p>info6 = guiCreateButton(199,15,19,18,\"?\",false,tab3)</p>\n<p>info7 = guiCreateButton(91,15,19,18,\"?\",false,tab3)</p>\n<p>info8 = guiCreateButton(90,52,19,18,\"?\",false,tab3)</p>\n<p>info9 = guiCreateButton(89,86,19,18,\"?\",false,tab3)</p>\n<p>info10 = guiCreateButton(88,120,19,18,\"?\",false,tab3)</p>\n<p>info11 = guiCreateButton(87,156,19,18,\"?\",false,tab3)</p>\n<p>tab4 = guiCreateTab(\"Share money\",tabPanel)</p>\n<p>tab5 = guiCreateTab(\"Lights\",tabPanel)</p>\n<p>guiCreateLabel(0.1,0.2,0.2,0.1,\"RED:\",true,tab5)</p>\n<p>guiCreateLabel(0.1,0.4,0.2,0.1,\"GREEN:\",true,tab5)</p>\n<p>guiCreateLabel(0.1,0.6,0.2,0.1,\"BLUE:\",true,tab5)</p>\n<p>redBar = guiCreateScrollBar( 0.3, 0.2, 0.65, 0.1, true, true, tab5)</p>\n<p>greenBar = guiCreateScrollBar( 0.3, 0.4, 0.65, 0.1, true, true, tab5)</p>\n<p>blueBar = guiCreateScrollBar( 0.3, 0.6, 0.65, 0.1, true, true, tab5)</p>\n<p>lightStatus = guiCreateButton(135,149,142,31,\"(1) Lights\",false,tab5)</p>\n<p>tab6 = guiCreateTab(\"CarColor\",tabPanel)</p>\n<p>carRedBar = guiCreateScrollBar( 0.3, 0.2, 0.65, 0.1, true, true, tab6)</p>\n<p>carGreenBar = guiCreateScrollBar( 0.3, 0.4, 0.65, 0.1, true, true, tab6)</p>\n<p>carBlueBar = guiCreateScrollBar( 0.3, 0.6, 0.65, 0.1, true, true, tab6)</p>\n<p>carBlueBar2 = guiCreateScrollBar( 0.3, 0.6, 0.65, 0.1, true, true, tab6)</p>\n<p>firstColorLabel = guiCreateLabel(22,39,112,19,\"First Color:\",false,tab6)</p>\n<p>guiLabelSetColor(firstColorLabel,255,255,255)</p>\n<p>guiLabelSetVerticalAlign(firstColorLabel,\"top\")</p>\n<p>guiLabelSetHorizontalAlign(firstColorLabel,\"left\",false)</p>\n<p>guiSetFont(firstColorLabel,\"clear-normal\")</p>\n<p>secondColorLabel = guiCreateLabel(22,77,112,19,\"Second Color:\",false,tab6)</p>\n<p>guiLabelSetColor(secondColorLabel,255,255,255)</p>\n<p>guiLabelSetVerticalAlign(secondColorLabel,\"top\")</p>\n<p>guiLabelSetHorizontalAlign(secondColorLabel,\"left\",false)</p>\n<p>guiSetFont(secondColorLabel,\"clear-normal\")</p>\n<p>guiSetVisible(carBlueBar2,false)</p>\n<p>guiSetVisible(carBlueBar,false)</p>\n<p>tab7 = guiCreateTab(\"Skin\",tabPanel)</p>\n<p>skinsGrid = guiCreateGridList(16,11,197,171,false,tab7)</p>\n<p>guiGridListAddColumn(skinsGrid,\"Group\",0.3)</p>\n<p>guiGridListAddColumn(skinsGrid,\"Name\",0.5)</p>\n<p>guiGridListSetColumnWidth(skinsGrid,1,0.4,true)</p>\n<p>guiGridListSetColumnWidth(skinsGrid,2,0.5,true)</p>\n<p>changeSkin = guiCreateButton(241,144,145,34,\"Change\",false,tab7)</p>\n<p>skinSelectLabel = guiCreateLabel(252,25,154,24,\"Select and click \\\"change\\\"\",false,tab7)</p>\n<p>guiLabelSetColor(skinSelectLabel,255,255,255)</p>\n<p>guiLabelSetVerticalAlign(skinSelectLabel,\"top\")</p>\n<p>guiLabelSetHorizontalAlign(skinSelectLabel,\"left\",false)</p>\n<p> </p>\n<p>function onresourceStart ()</p>\n<p> bindKey (\"F1\", \"down\", showUserPanel)</p>\n<p>end</p>\n<p>addEventHandler(\"onClientResourceStart\", getResourceRootElement(getThisResource()), onresourceStart)</p>\n<p> </p>\n<p>function showUserPanel ()</p>\n<p>getVisible = guiGetVisible (userPanelWindow)</p>\n<p>playerName = getPlayerName ( getLocalPlayer() )</p>\n<p>if (getVisible == true) then</p>\n<p> guiSetVisible (userPanelWindow, false)</p>\n<p> guiSetVisible (skinWin, false)</p>\n<p> guiSetVisible (nameWin, false)</p>\n<p> guiSetVisible(infoWin,false)</p>\n<p> showCursor (false)</p>\n<p>end</p>\n<p>if (getVisible == false) then</p>\n<p> guiSetVisible (userPanelWindow, true)</p>\n<p> showCursor (true)</p>\n<p> local playerMoney = getPlayerMoney(source)</p>\n<p> local playerPoints = getElementData(getLocalPlayer(), \"Points\")</p>\n<p> local playerWins = getElementData(getLocalPlayer(), \"Race Wins\") </p>\n<p> local playerLoses = getElementData(getLocalPlayer(), \"Race Loses\")</p>\n<p> guiSetText ( userPanelWindow, \"Welcome To Your UserPanel, \" .. playerName .. \" \" )</p>\n<p> guiSetText ( playerNickLabel, \"Name: [ \" .. playerName .. \" ]\" )</p>\n<p> guiSetText ( playerMoneyLabel, \"Your Money: [ \" .. playerMoney .. \" ]\" )</p>\n<p> guiSetText ( playerPointsLabel, \"My Points: [ \" .. playerPoints .. \" ]\" )</p>\n<p> guiSetText ( playeWinsLabel, \"Total wins: [ \" .. playerWins .. \" ]\" )</p>\n<p> guiSetText ( playeLosesLabel, \"Total loses: [ \" .. playerLoses .. \" ]\" )</p>\n<p> playerGridList = guiCreateGridList(3,12,137,350,false,tab2)</p>\n<p> mapGridList = guiCreateGridList(3,12,370,340,false,tab1)</p>\n<p> playersColumn = guiGridListAddColumn(playerGridList,\"Players\",0.85)</p>\n<p> guiGridListSetSelectionMode(playerGridList,2)</p>\n<p> populateGridlist()</p>\n<p> for id, plaItem in ipairs(getElementsByType(\"player\")) do</p>\n<p> row = guiGridListAddRow ( playerGridList )</p>\n<p> guiGridListSetItemText ( playerGridList, row, playersColumn, getPlayerName ( plaItem ), false, false )</p>\n<p> end</p>\n<p> addEventHandler( \"onClientGUIClick\", playerGridList, setGUI )</p>\n<p> end</p>\n<p>end</p>\n<p> </p>\n<p>function setGUI ( )</p>\n<p>selectedRow, selectedCol = guiGridListGetSelectedItem( playerGridList )</p>\n<p>gridPlayerName = guiGridListGetItemText( playerGridList, selectedRow, selectedCol )</p>\n<p>guiSetText ( playerNameEdit, gridPlayerName )</p>\n<p>end</p>\n<p> </p>\n<p> </p>\n<p>function onGuiClick (button, state, absoluteX, absoluteY)</p>\n<p> if (source == Flip) then</p>\n<p> triggerServerEvent (\"buyFlip\", getLocalPlayer())</p>\n<p> elseif (source == Nitro) then</p>\n<p> triggerServerEvent (\"buyNitro\", getLocalPlayer())</p>\n<p> elseif (source == GodMode) then</p>\n<p> triggerServerEvent (\"buyGodMode\", getLocalPlayer())</p>\n<p> elseif (source == Repair) then</p>\n<p> triggerServerEvent (\"buyRepair\", getLocalPlayer())</p>\n<p> elseif (source == Haystack) then</p>\n<p> triggerServerEvent (\"buyHay\", getLocalPlayer())</p>\n<p> elseif (source == Invisible) then</p>\n<p> triggerServerEvent (\"buyInvisible\", getLocalPlayer())</p>\n<p> elseif (source == Barrel) then</p>\n<p> triggerServerEvent (\"buyBarrel\", getLocalPlayer())</p>\n<p> elseif (source == Hunter) then</p>\n<p> triggerServerEvent (\"buyHunter\", getLocalPlayer())</p>\n<p> elseif (source == Hydra) then</p>\n<p> triggerServerEvent (\"buyHydra\", getLocalPlayer())</p>\n<p> elseif (source == GodOfWar) then</p>\n<p> triggerServerEvent (\"buyGodOfWar\", getLocalPlayer())</p>\n<p> elseif (source == TimeOfIce) then</p>\n<p> triggerServerEvent (\"buyTimeOfIce\", getLocalPlayer())</p>\n<p> elseif (source == setNameColor) then</p>\n<p> red = guiGetText ( redEdit )</p>\n<p> green = guiGetText ( greenEdit )</p>\n<p> blue = guiGetText ( blueEdit )</p>\n<p> triggerServerEvent (\"setPlayerNameTagColor\", getLocalPlayer(), red, green, blue)</p>\n<p> guiSetVisible (nameWin, false)</p>\n<p> elseif (source == setSkinButton) then</p>\n<p> skin = guiGetText ( skinEdit )</p>\n<p> triggerServerEvent (\"skin\", getLocalPlayer(), skin)</p>\n<p> guiSetVisible (skinWin, false)</p>\n<p> elseif (source == sendMoneyButton) then</p>\n<p> playerNick = guiGetText ( playerNameEdit )</p>\n<p> amount = guiGetText ( amountEdit )</p>\n<p> triggerServerEvent (\"sendMoney\", getLocalPlayer(), playerNick, amount)</p>\n<p> end</p>\n<p>end</p>\n<p>addEventHandler (\"onClientGUIClick\", getRootElement(), onGuiClick)</p>\n<p> </p>\n<p>function tagColorAndSkin (button, state, absoluteX, absoluteY)</p>\n<p> if (source == tagColorButton) then</p>\n<p> guiSetVisible(nameWin,true)</p>\n<p> elseif (source == skinChangerButton) then</p>\n<p> guiSetVisible(skinWin,true)</p>\n<p> end</p>\n<p>end</p>\n<p>addEventHandler (\"onClientGUIClick\", getRootElement(), tagColorAndSkin)</p>\n<p> </p>\n<p>nameWin = guiCreateWindow(2,256,254,147,\"NAME TAG COLOR\",false)</p>\n<p>guiSetVisible(nameWin,false)</p>\n<p>guiWindowSetSizable(nameWin,false)</p>\n<p>redEdit = guiCreateEdit(9,55,65,32,\"\",false,nameWin)</p>\n<p>guiEditSetMaxLength(redEdit,3)</p>\n<p>greenEdit = guiCreateEdit(92,55,65,32,\"\",false,nameWin)</p>\n<p>guiEditSetMaxLength(greenEdit,3)</p>\n<p>blueEdit = guiCreateEdit(174,55,65,32,\"\",false,nameWin)</p>\n<p>guiEditSetMaxLength(blueEdit,3)</p>\n<p>redGreenBlue = guiCreateLabel(16,26,213,21,\" RED GREEN BLUE\",false,nameWin)</p>\n<p>guiLabelSetColor(redGreenBlue,255,12,15)</p>\n<p>guiLabelSetVerticalAlign(redGreenBlue,\"top\")</p>\n<p>guiLabelSetHorizontalAlign(redGreenBlue,\"left\",false)</p>\n<p>setNameColor = guiCreateButton(75,106,102,27,\"Change\",false,nameWin)</p>\n<p> </p>\n<p>skinWin = guiCreateWindow(262,258,166,144,\"SKIN CHANGER\",false)</p>\n<p>guiSetVisible(skinWin,false)</p>\n<p>guiWindowSetSizable(skinWin,false)</p>\n<p>skinEdit = guiCreateEdit(39,57,87,32,\"\",false,skinWin)</p>\n<p>guiEditSetMaxLength(skinEdit,3)</p>\n<p>skinLabel = guiCreateLabel(43,31,79,30,\"SKIN ID HERE\",false,skinWin)</p>\n<p>guiLabelSetColor(skinLabel,255,255,255)</p>\n<p>guiLabelSetVerticalAlign(skinLabel,\"top\")</p>\n<p>guiLabelSetHorizontalAlign(skinLabel,\"left\",false)</p>\n<p>setSkinButton = guiCreateButton(39,102,87,29,\"Change\",false,skinWin)</p>\n<p> </p>\n<p>infoWin = guiCreateWindow(2,258,429,95,\"Item Info window\",false)</p>\n<p>guiSetVisible(infoWin,false)</p>\n<p>guiWindowSetSizable(infoWin,false)</p>\n<p>infoLabel = guiCreateLabel(14,31,400,23,\"\",false,infoWin)</p>\n<p>guiLabelSetColor(infoLabel,255,255,255)</p>\n<p>guiLabelSetVerticalAlign(infoLabel,\"top\")</p>\n<p>guiLabelSetHorizontalAlign(infoLabel,\"left\",false)</p>\n<p>infoCloseButton = guiCreateButton(138,66,117,20,\"close\",false,infoWin)</p>\n<p> </p>\n<p>function closeInfo ( )</p>\n<p> if ( guiGetVisible ( infoWin ) == true ) then </p>\n<p> guiSetVisible ( infoWin, false )</p>\n<p> end</p>\n<p>end</p>\n<p>addEventHandler (\"onClientGUIClick\", infoCloseButton, closeInfo)</p>\n<p> </p>\n<p>function infoStuff (button, state, absoluteX, absoluteY)</p>\n<p> if (source == info1) then</p>\n<p> guiSetVisible(infoWin,true)</p>\n<p> guiSetText(infoLabel,\"TimeOfIce will freeze all player cars for 1 minute. cost $ 2 mil.\")</p>\n<p> elseif (source == info2) then</p>\n<p> guiSetVisible(infoWin,true)</p>\n<p> guiSetText(infoLabel,\"GodOfWar will blow all player cars. cost $ 3 mil.\") </p>\n<p> elseif (source == info3) then</p>\n<p> guiSetVisible(infoWin,true)</p>\n<p> guiSetText(infoLabel,\"You get a hydra with the cost of $ 1.5 mil.\") </p>\n<p> elseif (source == info4) then</p>\n<p> guiSetVisible(infoWin,true)</p>\n<p> guiSetText(infoLabel,\"You get a hunter with the cost of $ 1 mil.\") </p>\n<p> elseif (source == info5) then</p>\n<p> guiSetVisible(infoWin,true)</p>\n<p> guiSetText(infoLabel,\"A barrel will be created in your position to blow players car. cost $ 12000.\") </p>\n<p> elseif (source == info6) then</p>\n<p> guiSetVisible(infoWin,true)</p>\n<p> guiSetText(infoLabel,\"Your car will get repaired. cost $ 5000.\") </p>\n<p> elseif (source == info7) then</p>\n<p> guiSetVisible(infoWin,true)</p>\n<p> guiSetText(infoLabel,\"Your car will be fliped. cost $ 10000.\") </p>\n<p> elseif (source == info8) then</p>\n<p> guiSetVisible(infoWin,true)</p>\n<p> guiSetText(infoLabel,\"Your car will be upgraded with nitro. cost $ 7000.\") </p>\n<p> elseif (source == info9) then</p>\n<p> guiSetVisible(infoWin,true)</p>\n<p> guiSetText(infoLabel,\"Your car will get bullet proof. cost $ 70000.\") </p>\n<p> elseif (source == info10) then</p>\n<p> guiSetVisible(infoWin,true)</p>\n<p> guiSetText(infoLabel,\"A hay stack will be created in your position. cost $ 10000.\") </p>\n<p> elseif (source == info11) then</p>\n<p> guiSetVisible(infoWin,true)</p>\n<p> guiSetText(infoLabel,\"You and your car will be invisible for a time. cost $ 20000.\") </p>\n<p> end</p>\n<p>end</p>\n<p>addEventHandler (\"onClientGUIClick\", getRootElement(), infoStuff)</p>\n<p> </p>\n<p>function ligh(state)</p>\n<p> local clientPlayer = getLocalPlayer()</p>\n<p> if isPedInVehicle(clientPlayer) == true then</p>\n<p> local playerVehicle = getPedOccupiedVehicle ( clientPlayer)</p>\n<p> if ( getVehicleOverrideLights ( playerVehicle ) ~= 2 ) then</p>\n<p> setVehicleOverrideLights ( playerVehicle, 2 )</p>\n<p> guiSetText(lightStatus,\"(l) Lights OFF\")</p>\n<p> else</p>\n<p> setVehicleOverrideLights ( playerVehicle, 1 )</p>\n<p> guiSetText(lightStatus,\"(l) Lights ON\") </p>\n<p> end</p>\n<p> else </p>\n<p> outputChatBox(\"You are not in a vehicle\",255,0,0,true)</p>\n<p> end </p>\n<p> end</p>\n<p>addEventHandler(\"onClientGUIClick\",lightStatus,ligh,false)</p>\n<p> </p>\n<p>function lightColor()</p>\n<p> if source == redBar or source == greenBar or source == blueBar then</p>\n<p> local car = getPedOccupiedVehicle(getLocalPlayer())</p>\n<p> triggerServerEvent(\"changeLightsColor\",getLocalPlayer(),car,(guiScrollBarGetScrollPosition(redBar)*2.55),(guiScrollBarGetScrollPosition(greenBar)*2.55),(guiScrollBarGetScrollPosition(blueBar)*2.55))</p>\n<p> end</p>\n<p>end</p>\n<p>addEventHandler(\"onClientGUIScroll\",getRootElement(),lightColor)</p>\n<p> </p>\n<p>function carColor()</p>\n<p> if source == carRedBar or source == carGreenBar or source == carBlueBar or source == carBlueBar2 then triggerServerEvent(\"changeCarColor\",getLocalPlayer(),(guiScrollBarGetScrollPosition(carRedBar)*2.55),(guiScrollBarGetScrollPosition(carGreenBar)*2.55),(guiScrollBarGetScrollPosition(carBlueBar)*2.55),(guiScrollBarGetScrollPosition(carBlueBar2)*2.55))</p>\n<p> end</p>\n<p>end</p>\n<p>addEventHandler(\"onClientGUIScroll\",getRootElement(),carColor)</p>\n<p> </p>\n<p>function populateGridlist()</p>\n<p> local rootnode = xmlLoadFile(\"skins.xml\")</p>\n<p> if rootnode then </p>\n<p> for _,group in ipairs(xmlNodeGetChildren(rootnode)) do</p>\n<p> local row = guiGridListAddRow(skinsGrid)</p>\n<p> local name = xmlNodeGetAttribute(group,\"type\")</p>\n<p> guiGridListSetItemText(skinsGrid,row,1,name,true,false) </p>\n<p> for _,skin in ipairs(xmlNodeGetChildren(group)) do</p>\n<p> row = guiGridListAddRow(skinsGrid)</p>\n<p> name = xmlNodeGetAttribute(skin,\"name\")</p>\n<p> local id = xmlNodeGetAttribute(skin,\"model\")</p>\n<p> guiGridListSetItemText(skinsGrid,row,1,name,false,false)</p>\n<p> guiGridListSetItemData(skinsGrid,row,1,tostring(id))</p>\n<p> end</p>\n<p> end </p>\n<p> xmlUnloadFile(rootnode)</p>\n<p> end</p>\n<p>end</p>\n<p> </p>\n<p>function createSkinHandler(button,state)</p>\n<p> if button == \"left\" and state == \"up\" then</p>\n<p> local row,col = guiGridListGetSelectedItem(skinsGrid)</p>\n<p> if row and col and row ~= -1 and col ~= -1 then</p>\n<p> local selected = guiGridListGetItemData(skinsGrid,row,col)</p>\n<p> skinid = tonumber(selected)</p>\n<p> triggerServerEvent(\"setSkinFromGUI\",getLocalPlayer(),skinid)</p>\n<p> outputChatBox ( \"Skin cambiado a: \".. tostring ( skinid ) .. \".\", 0,255,0 )</p>\n<p> else</p>\n<p> outputChatBox(\"Argumentos invalidos.\",255,12,15)</p>\n<p> end</p>\n<p> end</p>\n<p>end</p>\n<p> </p>\n<p>addEventHandler(\"onClientResourceStart\", getResourceRootElement( getThisResource() ),</p>\n<p>function()</p>\n<p> addEventHandler(\"onClientPlayerJoin\", getRootElement(), updateplayersList)</p>\n<p> addEventHandler(\"onClientPlayerQuit\", getRootElement(), updateplayersList)</p>\n<p> addEventHandler(\"onClientPlayerChangeNick\", getRootElement(), updateplayersList)</p>\n<p> addEventHandler(\"onClientGUIClick\", Refresh, REFRESHLIST)</p>\n<p> addEventHandler(\"onClientGUIClick\",ChangeChatColor,chatColor,false)</p>\n<p> addEventHandler(\"onClientGUIClick\",changeSkin,createSkinHandler,false) </p>\n<p> populateGridlist()</p>\n<p> end</p>\n<p>) Link to comment
TwiX! Posted May 5, 2012 Share Posted May 5, 2012 help me you can't edit my very old stolen panel (panel_client.lua) because its complited, you edit it by part from puma user panel, so ask him 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