Search the Community
Showing results for tags 'guigridlist'.
-
Olá, estou como ideia de converter um guiGrid em DxGrid usando o mode dxLib, mas eu não estou conseguindo criar as colunas, só queria um retângulo preto que é a lista sem colunas. Peguei essa função de um mod (vou chamar de mod A) que usa dxGrid e coloquei no meu mod (mod B) , n funciona(já botei o dxGrid.Lua no meta). Apaguei todas as funções que se comunica com o dxGrid.Lua do mod A e apaguei, deixe só a função abaixo e a Lista e as Colunas foram criadas normalmente. Coloquei a função no mod B e só criou a Lista sem coluna.(Tentei trocar o nome da Lista para ver se funcionava e não deu certo também) addEventHandler("onClientResourceStart", resourceRoot, function () Arm_Test = dxGridW:Create(470, 303, 427, 157) Arm_Test:AddColumn("Jogador", 207) Arm_Test:AddColumn("Arma", 210) Arm_Test:SetVisible(true) end)
-
Witam, zrobiłem kod, gdzie po wjechaniu samochodem do markeru pokazuje się gui, GridList, w kolumnie1 "Model" -> row "-" ma się pokazać nazwa samochodu. Pobiera jednak nazwę mojego samochodu a nie kogoś, kto wjedzie w marker. Pomoże ktoś? silnikIOpony = createMarker(-2050.5, 167.39999, 27.9, "cylinder", 1, 255, 0, 0, 0) -- marker do otwarcia GUI InfoOSamochodzie = createMarker(-2052.3999023438, 170.5, 27.799999237061, "cylinder", 4, 255, 255, 255, 255) -- marker w którym stoi samochód local screenW, screenH = guiGetScreenSize() komputerOponySilniki = guiCreateWindow(10, (screenH - 372) / 2, 836, 372, "Diagnostyka Komputerowa", false) guiWindowSetSizable(komputerOponySilniki, false) guiSetVisible(komputerOponySilniki, false) panelUszkodzen = guiCreateGridList(10, 29, 669, 287, false, komputerOponySilniki) column1 = guiGridListAddColumn(panelUszkodzen, "Model", 0.3) row = guiGridListAddRow(panelUszkodzen) nazwa = guiGridListSetItemText(panelUszkodzen, 0, 1, "-", false, false) addEventHandler("onClientMarkerHit", InfoOSamochodzie, function(hitPlayer,matchingDimension) if (not matchingDimension) or (isElement(komputerOponySilniki)) or (hitPlayer ~= localPlayer) then return end local veh = getPedOccupiedVehicle(localPlayer) guiGridListSetItemText(panelUszkodzen, 0, 1, ""..getVehicleName(veh).."", false, false) end ) addEventHandler("onClientMarkerLeave", InfoOSamochodzie, function(leftPlayer,matchingDimension) if (leftPlayer == localPlayer) and (matchingDimension) and (isElement(komputerOponySilniki)) then guiGridListClear(column1) end end )
-
Witam, zrobiłem kod, gdzie po wjechaniu samochodem do markeru pokazuje się gui, GridList, w kolumnie1 "Model" -> row "-" ma się pokazać nazwa samochodu. Pobiera jednak nazwę mojego samochodu a nie kogoś, kto wjedzie w marker. Pomoże ktoś? silnikIOpony = createMarker(-2050.5, 167.39999, 27.9, "cylinder", 1, 255, 0, 0, 0) -- marker do otwarcia GUI InfoOSamochodzie = createMarker(-2052.3999023438, 170.5, 27.799999237061, "cylinder", 4, 255, 255, 255, 255) -- marker w którym stoi samochód local screenW, screenH = guiGetScreenSize() komputerOponySilniki = guiCreateWindow(10, (screenH - 372) / 2, 836, 372, "Diagnostyka Komputerowa", false) guiWindowSetSizable(komputerOponySilniki, false) guiSetVisible(komputerOponySilniki, false) panelUszkodzen = guiCreateGridList(10, 29, 669, 287, false, komputerOponySilniki) column1 = guiGridListAddColumn(panelUszkodzen, "Model", 0.3) row = guiGridListAddRow(panelUszkodzen) nazwa = guiGridListSetItemText(panelUszkodzen, 0, 1, "-", false, false) addEventHandler("onClientMarkerHit", InfoOSamochodzie, function(hitPlayer,matchingDimension) if (not matchingDimension) or (isElement(komputerOponySilniki)) or (hitPlayer ~= localPlayer) then return end local veh = getPedOccupiedVehicle(localPlayer) guiGridListSetItemText(panelUszkodzen, 0, 1, ""..getVehicleName(veh).."", false, false) end ) addEventHandler("onClientMarkerLeave", InfoOSamochodzie, function(leftPlayer,matchingDimension) if (leftPlayer == localPlayer) and (matchingDimension) and (isElement(komputerOponySilniki)) then guiGridListClear(column1) end end )
-
Hello good friends I'm already more than 6 hours puzzling over this and tried in many ways and could not carry out the repair . For this reason I have come to ask for help from you, good is simple I'm doing a pizzaboy work for my rpg server ... and wanted some deliveries is without available in just a few hours .. see the code is easy to understand .. I will comment on the problems below. local screenW,screenH = guiGetScreenSize() local resW, resH = 1280,720 local x, y = (screenW/resW), (screenH/resH) --===================================================================[[Basicos]]===================================================================-- GridListPizzaBoyLS = guiCreateGridList(x*313, y*272, x*559, y*273, false) guiGridListAddColumn(GridListPizzaBoyLS, "ID", x*0.07) guiGridListAddColumn(GridListPizzaBoyLS, "Local", x*0.30) guiGridListAddColumn(GridListPizzaBoyLS, "Disponível em", x*0.28) guiGridListAddColumn(GridListPizzaBoyLS, "Disponibilidade das", x*0.20) guiGridListAddColumn(GridListPizzaBoyLS, "Lucro", x*0.09) guiGridListSetSortingEnabled(GridListPizzaBoyLS,false) guiSetVisible(GridListPizzaBoyLS,false) for i = 1, 30 do guiGridListAddRow(GridListPizzaBoyLS) end function VerificHourID1() -----------------------------------------------[[ 1 ]]----------------------------------------------- ----- ID 1 if (getTime() >= 00.00) and not (getTime() >= 02.00) then guiGridListSetItemText(GridListPizzaBoyLS, 0, 1, "1", false,false) guiGridListSetItemText(GridListPizzaBoyLS, 0, 2, "Pershing Square (DP) (LS)", false,false) guiGridListSetItemText(GridListPizzaBoyLS, 0, 4, "00:00 às 02:00", false,false) guiGridListSetItemText(GridListPizzaBoyLS, 0, 3, "Pizzaria De Los Santos", false,false) guiGridListSetItemText(GridListPizzaBoyLS, 0, 5, "60", false,false) -------------------------------------------------------------------------------------- guiGridListSetItemColor(GridListPizzaBoyLS, 0, 1, 0, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 0, 2, 0, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 0, 3, 0, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 0, 4, 0, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 0, 5, 0, 255, 0, 255, false, false) end if (getTime() >= 02.00) then guiGridListSetItemText(GridListPizzaBoyLS, 0, 1, "1", true,false) guiGridListSetItemText(GridListPizzaBoyLS, 0, 2, "Pershing Square (DP) (LS)", true,false) guiGridListSetItemText(GridListPizzaBoyLS, 0, 4, "00:00 às 02:00", true,false) guiGridListSetItemText(GridListPizzaBoyLS, 0, 3, "Pizzaria De Los Santos", true,false) guiGridListSetItemText(GridListPizzaBoyLS, 0, 5, "60", true,false) -------------------------------------------------------------------------------------- guiGridListSetItemColor(GridListPizzaBoyLS, 0, 1, 255, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 0, 2, 255, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 0, 3, 255, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 0, 4, 255, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 0, 5, 255, 255, 0, 255, false, false) end end addEventHandler("OnClientPreRender",root,VerificHourID1) --- function VerificHourID2() -----------------------------------------------[[ 2 ]]----------------------------------------------- if (getTime() >= 01.00) and not (getTime() >= 02.30) then guiGridListSetItemText(GridListPizzaBoyLS, 2, 1, "3", false,false) guiGridListSetItemText(GridListPizzaBoyLS, 2, 2, "Hospital Jefferson (LS", false,false) guiGridListSetItemText(GridListPizzaBoyLS, 2, 4, "01:00 às 02:30", false,false) guiGridListSetItemText(GridListPizzaBoyLS, 2, 3, "Pizzaria De Los Santos", false,false) guiGridListSetItemText(GridListPizzaBoyLS, 2, 5, "80", false,false) -------------------------------------------------------------------------------------- guiGridListSetItemColor(GridListPizzaBoyLS, 2, 1, 0, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 2, 2, 0, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 2, 3, 0, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 2, 4, 0, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 2, 5, 0, 255, 0, 255, false, false) elseif (getTime() >= 02.30) then guiGridListSetItemText(GridListPizzaBoyLS, 2, 1, "3", true,false) guiGridListSetItemText(GridListPizzaBoyLS, 2, 2, "Hospital Jefferson (LS)", true,false) guiGridListSetItemText(GridListPizzaBoyLS, 2, 4, "01:00 às 02:30", true,false) guiGridListSetItemText(GridListPizzaBoyLS, 2, 3, "Pizzaria De Los Santos", true,false) guiGridListSetItemText(GridListPizzaBoyLS, 2, 5, "80", true,false) -------------------------------------------------------------------------------------- guiGridListSetItemColor(GridListPizzaBoyLS, 2, 1, 255, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 2, 2, 255, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 2, 3, 255, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 2, 4, 255, 255, 0, 255, false, false) guiGridListSetItemColor(GridListPizzaBoyLS, 2, 5, 255, 255, 0, 255, false, false) end end addEventHandler("OnClientPreRender",root,VerificHourID2) setTimer(VerificHourID2,50,0) Note: I know I should not use "onClientPreRender" GUI .. more as you may have noticed it also contains a SetTimer result of tests .. Well my problem this ID 1 item works perfectly but the other (when all are 10) do not work correctly, or they just do not create yellow and green just ... it was probably some my mistake (or why not reviewed and redid these lines more than 5 times), and the biggest mistake he demonstrates one hour of delay that is elseif (getTime ()> = 30.2) then then it is only yellow 03:00 ... Note: I tried to use tb onClientRender and SetTimer and had the same result.