DjMPL Posted July 10, 2013 Share Posted July 10, 2013 Witam otóż zająłem się edycją skryptu truck, dodałem jeden towar i nie mogę go załadować możecie mi pomóc? Proszę o szybką pomoc. Sam nie doszedłem dlaczego tak jest o to kod: -- Miejsce skupu materialow local from = { { -1726.8140869141, -120.37453460693, 2.1521277427673 }, { -1240.9187011719, 47.490695953369, 12.733346939087 }, { -2167.6303710938, -212.92886352539, 33.838642120361 }, {-1853, 1401, 7}, {-2283, 2278, 4,5}, {-367, 1548, 75,1}, {346, 2534, 16,2}, {1641, 2414, 10}, {-2887, 503, 4}, {-1516, 729, 6}, {-684, 966, 12}, {948, 2279, 11}, {1489, 2146, 10}, {1908, 2157, 10}, {2242, 1977, 9}, {-658, 2317, 138}, {-2054, -2566, 30}, {-1416, -1469, 101}, {-605, -484, 25}, {-55, -329, 5}, {1077, -309, 75}, {-2644, 1334, 7}, {2481, 2796, 10}, {-857, -1945, 15}, {-87, -1574, 2}, {-2264, -1688, 480}, { -2029.1010742188, 172.45364379883, 27.35425567627 } } -- Miejsca sprzedarzy materialow local to = { { -1705.9104003906, 395.6416015625, 6.6980085372925 }, { -2521.9482421875, -615.18835449219, 132.08641052246 }, { -1915.8461914063, -1718.0207519531, 21.268323898315 }, {-462, -1905, 7}, {-80, 1164, 1}, {-2335, -1582, 483}, {-2082, 1405, 7}, {-2233, 2299, 5}, --{-2618, 1510, 75}, {400, 2484, 16}, {1604, 2415, 10}, {-2976, 477, 4}, {-708, 953, 12}, {941, 2279, 10}, {1485, 2111, 10}, {1912, 2118, 10}, {2302, 1964, 9}, {-772, 2423, 157}, {-2619, 1376, 7}, { -2196.3051757813, -2263.3464355469, 30.151552200317 } } local pmoney = getPlayerMoney(source) -- Definicje modelow ciezarowek local vehicle_ids = {[414] = true, [456] = true, [455] = true, [429] = true, [515] = true} -- Nagroda w $ local paid = 5000 -- Ponizej nic nie zmieniac local markers = {} local destmarker local destblip local retmoney function onHit(element) if element == getLocalPlayer() then local v = getPedOccupiedVehicle(element) if getElementType(v) == "vehicle" then --if vehicle_ids[getElementModel(v)] then Window10:Visible(true) showCursor(true) --end end end end function exitWindow() Window10:Visible(false) showCursor(false) end function recieveDestMarker() givePlayerMoney(retmoney) outputChatBox("* Dostaleś $" .. tostring(retmoney), 255, 255, 0) setElementData(getPedOccupiedVehicle(getLocalPlayer()), "retmoney", false) setElementData(getLocalPlayer(), "Pkt", getElementData(getLocalPlayer(), "Pkt") + 1) destroyElement(destmarker) destroyElement(destblip) end function passThru(ret) addPercent(ret) end function addPercent(ret) local cur = Progress10:Progress() if cur >= 100 then Progress10:Progress(0) dest = to[math.random(1, #to)] destroyElement(destmarker) destroyElement(destblip) destmarker = createMarker(dest[1], dest[2], dest[3], "cylinder", 3, 255, 255, 0, 255) destblip = createBlip( dest[1], dest[2], dest[3], 41, 2, 255, 255, 0, 0, 100) retmoney = ret Event:Use("onClientMarkerHit"):Handle(recieveDestMarker, destmarker) Window10:Visible(false) showCursor(false) else Progress10:Progress(cur + 5) if Progress10:Progress() == 100 then passThru(ret) end end end function buyItem() points = getElementData(getLocalPlayer(), "Pkt") if RadioButton10:Selected() then if points >= -50 then setTimer(addPercent, math.random(60, 90), 21, math.random(30, 50)) else outputChatBox("Nie masz wystarczajaca ilosc punktow", 255, 0, 0) end end end function onStart() local x,y = guiGetScreenSize() Window10 = Window:Create(200, 50, 400, 500, "System paczek v1.0 by DjMPL") RadioButton10 = Window10:AddRadioButton(40, 20, 60, 20, "Smieci") RadioButton20 = Window10:AddRadioButton(40, 40, 60, 20, "Test") Button10 = Window10:AddButton(330, 20, 65, 20, "Zakup!") Button20 = Window10:AddButton(330, 40, 65, 20, "Zamknij!") info1 = Window10:AddButton(330, 60, 65, 20, "Autor") info2 = Window10:AddButton(20, 23, 15, 15, "?") info3 = Window10:AddButton(20, 23, 15, 15, "?") Progress10 = Window10:AddProgressBar(10, 460, 380, 20) Button10:AddOnClick(buyItem) Button20:AddOnClick(exitWindow) Window10:Visible(false) --[[ GridList1 = Window10:AddGridList(30, 230, 370, 300) GridList1:AddColumn("Towar", 0.6) GridList1:AddColumn("Pkt", 0.6) GridList1:AddColumn("Cena", 0.6) GridList1:AddRow( "piasek", "0", "10" ) --]] for k,v in ipairs(from) do local marker = createMarker( v[1], v[2], v[3], "cylinder", 3, 0, 0, 255, 255) table.insert( markers, marker ) Event:Use("onClientMarkerHit"):Handle(onHit, marker) createBlip( v[1], v[2], v[3], 51, 2, 255, 255, 0, 0, 400, 400) end end Event:Use("onClientResourceStart"):Handle(onStart, ResourceRoot) function Autor () outputChatBox("System paczek v1.0 by DjMPL", 255, 0, 0) end addEventHandler ( "onClientGUIClick", info1, Autor ) Link to comment
DjMPL Posted July 10, 2013 Author Share Posted July 10, 2013 Naprawione, prosze o zamknięcie. Link to comment
Recommended Posts