Turbo69
Maper MTA
Wiek: 24 Na forum: 3761 dni Posty: 38
Piwa : 1740
Ot?? napisa?em prosty skrypt na swiatla kolorowe montowanie pod gui i teraz nie wiem co ?le robie ale sie nie montuj?! Prosz? zwr?cic uwage na ostatni? funkcje
Kod:
GUIEditor = {
button = {},
window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(431, 144, 411, 309, "Zmiana koloru swiate?", false)
guiWindowSetSizable(GUIEditor.window[1], false)
GUIEditor.button[1] = guiCreateButton(27, 34, 109, 73, "Bia?e - 500 PLN", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
GUIEditor.button[2] = guiCreateButton(154, 34, 109, 73, "Zielone - 70000 PLN", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF00FF00")
GUIEditor.button[3] = guiCreateButton(279, 34, 109, 73, "Niebieskie - 70000 PLN", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF")
GUIEditor.button[4] = guiCreateButton(27, 123, 109, 73, "Czerwone - 70000 PLN", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFF0000")
GUIEditor.button[5] = guiCreateButton(27, 123, 109, 73, "Czerwone - 70000 PLN", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFF0000")
GUIEditor.button[6] = guiCreateButton(154, 123, 109, 73, "R??owe - 65000 PLN", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFE06EA")
GUIEditor.button[7] = guiCreateButton(279, 123, 109, 73, "Fioletowe - 65000 PLN", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FF9800F9")
GUIEditor.button[8] = guiCreateButton(27, 212, 109, 73, "Limonkowe - 70000 PLN", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFB4F700")
GUIEditor.button[9] = guiCreateButton(154, 212, 109, 73, "Aqua - 60000 PLN", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FF00F4F6")
GUIEditor.button[10] = guiCreateButton(279, 212, 109, 73, "???ty - 70000 PLN", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[10], "NormalTextColour", "FFF5F300")
end
)
addEventHandler ("onClientResourceStart", resourceRoot, function ()
guiSetVisible (GUIEditor.window[1], false)
end
)
montazswiatel = createMarker (2485.07983, -1663.59583, 13.33595, "cylinder", 5, 255, 0, 0, 100)
addEventHandler ("onClientMarkerHit", montazswiatel, function (el, md)
if not md or el~= localPlayer then return end
showCursor (true)
guiSetVisible (GUIEditor.window[1], true)
end
)
addEventHandler ("onClientGUIClick", resourceRoot, function ()
if source ~= GUIEditor.button[1] then return end
local kasa = getPlayerMoney (localPlayer)
if kasa < 500 then return end
triggerServerEvent ("local auto = getPedOccupiedVehicle (localPlayer)")
triggerServerEvent ("setVehicleHeadLightColor", auto, 255, 255, 255)
end
)
Z g?ry dzi?kuje