Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: wszystkim
1. dgs nad wszystkim
Witam, chcia?bym si? dowiedzie? dlaczego DGS, jest nad wszystkimi innymi wy?wietlanymi skryptami. Np tu mam gridliste z dgs'a, a w??czam panel f1 i nadal j? widze, a same okienko kt?re jest w DX, nie, mo?na temu jako? zaradzi?.

https://imgur.com/a/47R1DJp
2. Jak dać premium wszystkim którzy wejdą na serwer?
Cze?? wszystkim, jak da? wszystkim kt?rzy wejd? na serwer premium na kore?lony czas?. Szuka?em w plikach paczki i nie ma tam takiej zak?adki jak premium? wie kto? co robi? ?le? mam paczke navaxa. Z g?ry dzi?ki
3. kończenie pracy wszystkim na magazynie
odczas wej??ia w blip ko?czenia pracy, zaka?cza prac? wszystkim raz wy?wietla notke wszystkim wok??
Jak kto? mo?e to prosze o wys?anie naprawionego kodu (ko?czenie pracy na samym ko?cu)
kod:

[lua]local screenW, screenH = guiGetScreenSize()
local startMagazyn = createMarker(2128.73, -2281.29, 14.24, "cylinder", 1.2)
setElementData(startMagazyn, "praca", true)
setElementDimension(startMagazyn, 0)

x, y = guiGetScreenSize()
px, py = (x/1024), (y/768)

pkt = {
{2162.06, -2263.93, 13.80},
{2159.68, -2270.21, 13.80},
{2137.31, -2255.17, 13.80},
{2143.15, -2254.54, 13.80},
{2143.77, -2249.24, 13.80},
{2150.12, -2252.99, 13.80},
{2148.86, -2248.05, 13.80},
{2160.23, -2258.49, 13.80},
--
{2163.50, -2259.14, 13.80},
{2165.94, -2261.86, 13.80},
{2166.06, -2242.07, 13.80},
{2163.87, -2244.06, 13.80},
{2165.07, -2250.83, 13.80},
{2167.08, -2252.51, 13.80},
{2170.59, -2252.84, 13.80},
{2172.83, -2250.83, 13.80},
{2174.66, -2249.49, 13.80},

}


setElementData(localPlayer, "skrzynia:magazyn", nil)

function isMouseIn ( x, y, width, height )
if ( not isCursorShowing( ) ) then
return false
end
local sx, sy = guiGetScreenSize ( )
local cx, cy = getCursorPosition ( )
local cx, cy = ( cx * sx ), ( cy * sy )
if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then
return true
else
return false
end
end

posx, posy = 465, 6...
4. kończenie wszystkim pracy
Podczas wej??ia w blip ko?czenia pracy, zaka?cza prac? wszystkim raz wy?wietla notke wszystkim wok??

kod:
[lua]ocal screenW, screenH = guiGetScreenSize()
local startMagazyn = createMarker(2128.73, -2281.29, 14.24, "cylinder", 1.2)
setElementData(startMagazyn, "praca", true)
setElementDimension(startMagazyn, 0)

x, y = guiGetScreenSize()
px, py = (x/1024), (y/768)

pkt = {
{2162.06, -2263.93, 13.80},
{2159.68, -2270.21, 13.80},
{2137.31, -2255.17, 13.80},
{2143.15, -2254.54, 13.80},
{2143.77, -2249.24, 13.80},
{2150.12, -2252.99, 13.80},
{2148.86, -2248.05, 13.80},
{2160.23, -2258.49, 13.80},
--
{2163.50, -2259.14, 13.80},
{2165.94, -2261.86, 13.80},
{2166.06, -2242.07, 13.80},
{2163.87, -2244.06, 13.80},
{2165.07, -2250.83, 13.80},
{2167.08, -2252.51, 13.80},
{2170.59, -2252.84, 13.80},
{2172.83, -2250.83, 13.80},
{2174.66, -2249.49, 13.80},

}


setElementData(localPlayer, "skrzynia:magazyn", nil)

function isMouseIn ( x, y, width, height )
if ( not isCursorShowing( ) ) then
return false
end
local sx, sy = guiGetScreenSize ( )
local cx, cy = getCursorPosition ( )
local cx, cy = ( cx * sx ), ( cy * sy )
if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then
return true
else
return false
end
end

posx, posy = 465, 621

addEventHandler("onClientRender", root, function()
if not getElementData(localPlayer, &...
5. LUA MTA localPlayer clientside dxdraw wyświetla wszystkim
LUA MTA

Nie wiem czy ja nie wyspany, czy co ale wsz?dzie jest localPlayer, ca?y skrypt client-side a dxdraw ten od rozpocznij prace wy?wietla wszystkim o co kaman


cside
[code]
--[[
Praca Magazyniera V.2
Autorem jest adaskOO(Roe)
Zakaz zmieniania autora!
JeĹĽeli postanowisz edytowa?‡ ten skrypt, dopisz siebie. Prosze doce?„ moj?… prace i nie usuwaj autora!
Udost?™pniono na gtao.pl 11.11.2018.
Client Side
--]]

--Tworzy markery
marker = createMarker(369.22336, -119.07957, 1001.49219-0.9, "cylinder", 2, 155, 155, 0, 210)
setElementInterior(marker, 5)
setElementDimension(marker, 0)
markerZABIERANIA = createMarker(376.76630, -120.82995, 1001.49951-1, "cylinder", 3, 0, 0, 0, 210)
setElementInterior(markerZABIERANIA, 5)
setElementDimension(markerZABIERANIA, 0)

setElementInterior(markery, 0)
setElementDimension(markery, 0)
local markery={
--[[ Przyk?‚ad: ||| {x, y, z , "cylinder", wielkosc, kolor RED, Kolor GREEN, Kolor BLUE, Przezroczysto?›?‡}, ||| --]]
{2102.00464, -1802.54797, 13.55469-0.9 , "cylinder", 1, 0, 255, 0, 130},
{2102.16699, -1811.50879, 13.55469-0.9 , "cylinder", 1, 0, 255, 0, 130},
}

--[----------------------------------------------------]--


--Pozycja Kursora(function https://wiki.multitheftauto.com/wiki/IsMouseInPosition)
function isMouseInPosition ( x, y, width, height )
if ( not isCursorShowing( ) ) then
return false
end
...
6. Gui pokazuje sie wszystkim
Witam, odk?d zacz??em prace nad prac? magazyniera zapomnia?em jak sie robi?o aby gui sie tylko pokazywa?o osobie kt?ra wchodzi w marker kto? pomo?e dopisa? tutaj to do kodu?

Kod:


local marker = createMarker( 2176.77, -2253.96, 14.07, "cylinder", 2, 0, 64, 255, 75)
local markerZABIERANIA = createMarker(2188.69921875, -2253.8017578125, 13.465845108032-1, "cylinder", 5, 0, 0, 0, 210)


function dxDrawGUI()

dxDrawImage(73*rx, 119*ry, 1297*rx, 712*ry, "tlo_job.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)

exports['dxLibary']:dxLibary_createButton('Zamknij okno',649*rx, 652*ry, 188*rx, 35*ry)
exports['dxLibary']:dxLibary_text('Praca polega na przenoszeniu skrzynek nz dworu do magazynunna wylosowana pulke.nnWynagrodznie:nGracz: 5000 PLN/SkrzynkanGracz premium: 7000 PLN/SkrzynkanGracz Premium+: 8000 PLN/Skrzynka‚ ', 587*rx, 386*ry, 882*rx, 504*ry, tocolor(255, 255, 255, a), 5, 'default', 'center', 'top', false, false, false, true, false)
if getElementData(localPlayer, "praca:magazyn") == true then
exports['dxLibary']:dxLibary_createButton('Zakoncz',649*rx, 608*ry, 188*rx, 35*ry)

else
exports['dxLibary']:dxLibary_createButton('Rozpocznij',649*rx, 608*ry, 188*rx, 35*ry)
end

end
7. Wiadomosc wyswietla sie wszystkim
Mam taki kod, ale wiadomosc zamiast wyswietlac sie jednej osobie ktora pracuje, wyswietla sie calemu serwerowi, co ejst zle?

[lua]
createBlip(-2008.36, -2406.55, 30.63 ,51,2,0,0,0,0,0,275)
local packer_job = {
lv = {
start_job_marker = {-2008.36, -2406.55, 30.58-1},
spawn_vehicle_position = {-2004.66, -2411.61, 30.63, 359.3, 360.0, 135.3},
get_vehicles_marker = {-1999.20, -2416.49, 30.58-1},
},
}
--local t2=createElement("text")
--setElementPosition(t2,-2005.58, -2412.28, 30.63)
--setElementData(t2,"name","QualityGame.plnZakaz zastawiania")

--local t=createElement("text")
--setElementPosition(t,-2015.47, -2399.02, 30.63)
--setElementData(t,"name","QualiyGame.plnnWo?enie drewnanWymagania: 500RP, Kat. B")

--local t2=createElement("text")
--setElementPosition(t2, -2039.42, -2383.04, 30.63)
--setElementData(t2,"name","QualityGame.pln?adowanie drewna")

for i,v in pairs(packer_job) do
local job_marker = createMarker(v.start_job_marker[1],v.start_job_marker[2],v.start_job_marker[3],"cylinder",1.2,254,127,0,150)
local colsphere = createColSphere(v.spawn_vehicle_position[1],v.spawn_vehicle_position[2],v.spawn_vehicle_position[3],7)
setElementData(job_marker,"spawn",v.spawn_vehicle_position)
setElementData(job_marker,"start_job",true)
setElementData(job_marker,"colsphere",colsphere)

local vehicle_marker = cre...
8. editbox pojawią się pod wszystkim
Witam, przychodz? z by? mo?e banaln? spraw?, lecz exportowany editbox z innego skryptu pojawia si? pod ka?dym mo?liwym img. tzn, ze dopiero jak powy??czam grafiki to b?dzie wida? editbox'a. Kto? wie jak zrobi?, aby editbox mia? "pierwszy priorytet"?


function draw()
    if 
guiMain == true then
        dxDrawImage
(0/scaleW0/scaleH1920/scaleW1080/scaleH"files/background.png"000tocolor(255255255125), false)
    
end
end

addEventHandler
("onClientResourceStart"resourceRoot, function()
    
exports["editbox"]:create("""editbox"892.546520040"Przyk?ad..."false22truetruetruefalsetrue)
    
exports["editbox"]:setVisible("editbox"true)
    
guiMain true
    addEventHandler
("onClientRender"rootdraw)
    
showCursor(true)
end)
9. Gui wyskakuje wszystkim
server:
[lua]
addEvent("ZmienHandling2", true)
addEventHandler("ZmienHandling2", root, function()
pojazd = getPedOccupiedVehicle(source)
if not pojazd then return end
takePlayerMoney ( source, 1500)
outputChatBox("Pomy?lnie Zamontowano tuning.", source,true)

setVehicleHandling(pojazd, "maxVelocity", 200.0 )--MK1 Pr?dko??
setVehicleHandling(pojazd, "maxVelocity", velocity)
end
)


addEvent("ZmienHandling", true)
addEventHandler("ZmienHandling", root, function()
pojazd = getPedOccupiedVehicle(source)--MK 1 Przy?pieszenie
if not pojazd then return end
takePlayerMoney ( source, 3000 )
outputChatBox("Pomy?lnie Zamontowano tuning.", source,true)

local acceleration = 15.0
setVehicleHandling(pojazd, "engineAcceleration", acceleration )
end
)


addEvent("ZmienHandling5", true)
addEventHandler("ZmienHandling5", root, function()--MK2 Pr?dko??
pojazd = getPedOccupiedVehicle(source)
if not pojazd then return end
takePlayerMoney ( source, 10000 )
outputChatBox("Pomy?lnie Zamontowano tuning.", source,true)

setVehicleHandling(pojazd, "maxVelocity", 250.0 )
setVehicleHandling(pojazd, "maxVelocity", velocity)
end
)

addEvent("ZmienHandling4", true)
addEventHandler("ZmienHandling4", root, function()--MK2 Przy?pieszenie
pojazd = getPedOccupiedVehicle(source)
if not poja...
10. Okienko zamiast wyświetlać się graczowi, wyświetla wszystkim
kod ten sprawdza czy pojazd, do kt?rego wszed? gracz to Pizzaboy
je?li jest to prawda, to wy?wietla okienko, problem w tym, ?e powinien (z za?o?enia) tylko temu graczowi, kt?ry wszed? do pojazu, a pojawia si? wszystkim graczom


function sprawdzanieOkienko()
    
local theVehicle getPedOccupiedVehicle(source)
    if(
getVehicleName(theVehicle)) == "Pizzaboy"  then
        sX
sY guiGetScreenSize()
        
gui_Window guiCreateWindow(0.1040.3260.2320.301"Pizzaboy"true)
        
gui_Memo guiCreateMemo(0.0390.120.9230.8"opis",truegui_Window)
    
end
end
addEventHandler
("onClientPlayerVehicleEnter"getRootElement(), sprawdzanieOkienko)


co jest w tym kodzie nie tak? podany kod jest po stronie clienta
11. Gui otwiera sie wszystkim graczą (ma tylko 1)
Tak jak u g?ry. oczywi?cie ma sie pojawic tej osobie co wjedzie w marker)
Prosi?bym o kr?tkie wyt?umaczenie jak ktos napisze, ?ebym wiedzia? na przysz?o?? jak robi?.


    
function wylaczoknopraca(thePlayer)
    if 
source == wroc then
             guiSetVisible
(oknofalse)
             
guiSetVisible(memofalse)
             
guiSetVisible(zatrudnijfalse)
             
guiSetVisible(zwolnijfalse)
             
guiSetVisible(wrocfalse)
             
showCursor(false)
    
end
    end   
12. Kasa na minusie i wszystkim wyświetla się GUI
Skrypt wy?wietla ka?dym GUI montowania, gdy? kto? inny wjedzie w marker. Drugi problem polega na tym, ?e gdy kto? nie ma danej kwoty to mu bierze pieni?dze i zostawia mu na minusie.
Kod strona clienta (GUI):
[lua]

GUIEditor = {
button = {},
window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(339, 179, 499, 460, "", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.83)

GUIEditor.button[1] = guiCreateButton(25, 37, 115, 58, "MK-1 Przy?pieszenien (3900$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[2] = guiCreateButton(140, 37, 113, 58, "MK-1 Pr?dko??n (4600$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[3] = guiCreateButton(261, 38, 220, 57, "Demont", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[4] = guiCreateButton(25, 103, 115, 51, "MK-2 Przy?pieszenien (5100$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[5] = guiCreateButton(138, 1...
13. Jak podmienić radar (F11) wszystkim graczom na serwerze?
Tak jak w temacie.