Wysłany: 2020-06-22, 21:36
IceBrick
Wiek: 26 Na forum: 3541 dni Posty: 11
Piwa : 1
Witam potrzebuje pomocy ze skryptem na pojemno?? silnik?w. M?j problem polega na tym, ?e zmieniam koordynaty markeru, ale on si? nie pojawia wcale w ?adnym miejscu.
Z g?ry dzi?kuje za pomoc.
Link do owego skryptu: Kod: https://gtao.pl/%3Cfont-colorcccc99%3Eskrypt%3C-font%3E-pojemnosci-silnikow-vt135463.htm
Więcej szczegółów
Wystawiono 1 piw(a):kamilowy
Wysłany: 2020-06-22, 22:14
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
B??dy /debugscript 3? Poka? kod po swoich zmianach.
Wysłany: 2020-06-22, 22:22
IceBrick
Wiek: 26 Na forum: 3541 dni Posty: 11
Piwa : 1
B??d?w nie ma ?adnych marker si? nie pojawia nic poza pozycj? tego markera nie zmienia?em.
Kod:
GUIEditor = {
button = {},
window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateStaticImage(330, 200, 405, 460, "elo.png", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.83)
GUIEditor.button[1] = guiCreateStaticImage(10, 25, 200, 65, "16.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[2] = guiCreateStaticImage(200, 25, 200, 65, "18.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[3] = guiCreateStaticImage(10, 100, 200, 65, "20.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[4] = guiCreateStaticImage(200, 100, 200, 65, "22.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[5] = guiCreateStaticImage(10, 175, 200, 65, "24.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[6] = guiCreateStaticImage(200, 175, 200, 65, "26.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[7] = guiCreateStaticImage(10, 250, 200, 65, "28.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[9] = guiCreateStaticImage(200, 250, 200, 65, "30.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[8] = guiCreateStaticImage(100, 350, 200, 65, "cofnij.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFAAAAAA")
-- rh = guiCreateStaticImage(23, 37+70, 115, 58, "button28.png", false, GUIEditor.window[1])guiSetProperty(rh, "NormalTextColour", "FFAAAAAA")
end
)
addEventHandler("onClientResourceStart",resourceRoot,
function()
guiSetVisible(GUIEditor.window[1],false)
end
)
marker = createMarker{-2423.08984, -608.18579, 132.56250, 'cylinder', 4, 255, 0, 0, 120)
--createBlipAttachedTo(marker, 63)
function hit(plr,md)
if plr ~= localPlayer then return end
if not isPedInVehicle(localPlayer) then return end
guiSetVisible(GUIEditor.window[1], true)
showCursor(true)
setElementFrozen(pojazd,true)
--setElementFrozen(plr,true)
end
addEventHandler("onClientMarkerHit", marker, hit)
function p1()
if source ~= GUIEditor.button[1] then return end
triggerServerEvent("p1", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, p1)
function p2()
if source ~= GUIEditor.button[2] then return end
triggerServerEvent("p2", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, p2)
function p3()
if source ~= GUIEditor.button[3] then return end
triggerServerEvent("p3", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, p3)
function p4()
if source ~= GUIEditor.button[4] then return end
triggerServerEvent("p4", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, p4)
function p5()
if source ~= GUIEditor.button[5] then return end
triggerServerEvent("p5", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, p5)
function p6()
if source ~= GUIEditor.button[6] then return end
triggerServerEvent("6", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, 6)
function p7()
if source ~= GUIEditor.button[7] then return end
triggerServerEvent("p7", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, p7)
function p8()
if source ~= GUIEditor.button[9] then return end
triggerServerEvent("p8", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, p8)
-------------------------------------------------
function zamknij()
if source ~= GUIEditor.button[8] then return end
guiSetVisible(GUIEditor.window[1], localPlayer)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, zamknij)
function zamykamy()
if source ~= GUIEditor.button[8] then return end
guiSetVisible(GUIEditor.window[1],false)
setElementFrozen(pojazd,false)
setElementFrozen(plr,false)
showCursor(false)
end
addEventHandler ( "onClientGUIClick", root, zamykamy)
Wysłany: 2020-06-22, 22:28
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Na 99,9% s? b??dy. Zaraz po s?owie "createMarker" da?e? z?y nawias, zamiast ( jest {.
marker = createMarker (- 2423.08984 , - 608.18579 , 132.56250 , 'cylinder' , 4 , 255 , 0 , 0 , 120 )
Więcej szczegółów
Wystawiono 1 piw(a):IceBrick
Wysłany: 2020-06-22, 22:49
IceBrick
Wiek: 26 Na forum: 3541 dni Posty: 11
Piwa : 1
Rzeczywi?cie z?e nawiasy, ale dalej si? nie chce pojawi?
Kod po poprawce:
Kod:
GUIEditor = {
button = {},
window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateStaticImage(330, 200, 405, 460, "elo.png", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.83)
GUIEditor.button[1] = guiCreateStaticImage(10, 25, 200, 65, "16.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[2] = guiCreateStaticImage(200, 25, 200, 65, "18.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[3] = guiCreateStaticImage(10, 100, 200, 65, "20.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[4] = guiCreateStaticImage(200, 100, 200, 65, "22.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[5] = guiCreateStaticImage(10, 175, 200, 65, "24.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[6] = guiCreateStaticImage(200, 175, 200, 65, "26.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[7] = guiCreateStaticImage(10, 250, 200, 65, "28.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[9] = guiCreateStaticImage(200, 250, 200, 65, "30.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[8] = guiCreateStaticImage(100, 350, 200, 65, "cofnij.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFAAAAAA")
-- rh = guiCreateStaticImage(23, 37+70, 115, 58, "button28.png", false, GUIEditor.window[1])guiSetProperty(rh, "NormalTextColour", "FFAAAAAA")
end
)
addEventHandler("onClientResourceStart",resourceRoot,
function()
guiSetVisible(GUIEditor.window[1],false)
end
)
marker = createMarker(-2751.97168, 366.16501, 4.16703, "cylinder", 4, 255, 0, 0, 120)
--createBlipAttachedTo(marker, 63)
function hit(plr,md)
if plr ~= localPlayer then return end
if not isPedInVehicle(localPlayer) then return end
guiSetVisible(GUIEditor.window[1], true)
showCursor(true)
setElementFrozen(pojazd,true)
--setElementFrozen(plr,true)
end
addEventHandler("onClientMarkerHit", marker, hit)
function p1()
if source ~= GUIEditor.button[1] then return end
triggerServerEvent("p1", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, p1)
function p2()
if source ~= GUIEditor.button[2] then return end
triggerServerEvent("p2", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, p2)
function p3()
if source ~= GUIEditor.button[3] then return end
triggerServerEvent("p3", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, p3)
function p4()
if source ~= GUIEditor.button[4] then return end
triggerServerEvent("p4", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, p4)
function p5()
if source ~= GUIEditor.button[5] then return end
triggerServerEvent("p5", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, p5)
function p6()
if source ~= GUIEditor.button[6] then return end
triggerServerEvent("6", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, 6)
function p7()
if source ~= GUIEditor.button[7] then return end
triggerServerEvent("p7", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, p7)
function p8()
if source ~= GUIEditor.button[9] then return end
triggerServerEvent("p8", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, p8)
-------------------------------------------------
function zamknij()
if source ~= GUIEditor.button[8] then return end
guiSetVisible(GUIEditor.window[1], localPlayer)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, zamknij)
function zamykamy()
if source ~= GUIEditor.button[8] then return end
guiSetVisible(GUIEditor.window[1],false)
setElementFrozen(pojazd,false)
setElementFrozen(plr,false)
showCursor(false)
end
addEventHandler ( "onClientGUIClick", root, zamykamy)
Tagi: pojemnosci :: silników
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: