Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - Decompiled Client.luac
- Center = function(l_1_0)
- local l_1_1, l_1_2 = guiGetScreenSize()
- local l_1_3, l_1_4 = guiGetSize(l_1_0, false)
- local l_1_5 = (l_1_1 - l_1_3) / 2
- local l_1_6 = (l_1_2 - l_1_4) / 2
- guiSetPosition(l_1_0, l_1_5, l_1_6, false)
- end
- wCenter = function(l_2_0)
- local l_2_1, l_2_2 = guiGetScreenSize()
- local l_2_3, l_2_4 = guiGetSize(l_2_0, false)
- local l_2_5 = (l_2_1 - l_2_3) / 2
- local l_2_6 = (l_2_2 - l_2_4) / 2
- guiSetPosition(l_2_0, l_2_5 + 300, l_2_6 - 136, false)
- end
- tCenter = function(l_3_0)
- local l_3_1, l_3_2 = guiGetScreenSize()
- local l_3_3, l_3_4 = guiGetSize(l_3_0, false)
- local l_3_5 = (l_3_1 - l_3_3) / 2
- local l_3_6 = (l_3_2 - l_3_4) / 2
- guiSetPosition(l_3_0, l_3_5 + 300, l_3_6 + 5, false)
- end
- fsCenter = function(l_4_0)
- local l_4_1, l_4_2 = guiGetScreenSize()
- local l_4_3, l_4_4 = guiGetSize(l_4_0, false)
- local l_4_5 = (l_4_1 - l_4_3) / 2
- local l_4_6 = (l_4_2 - l_4_4) / 2
- guiSetPosition(l_4_0, l_4_5 + 300, l_4_6 + 115, false)
- end
- addEventHandler("onClientResourceStart", resourceRoot, function()
- wnd = guiCreateWindow(330, 159, 361, 469, "VIP", false)
- guiWindowSetMovable(wnd, false)
- guiWindowSetSizable(wnd, false)
- guiSetVisible(wnd, false)
- Center(wnd)
- guiSetProperty(wnd, "CaptionColour", "FFFFFF00")
- vGrid = guiCreateGridList(10, 240, 182, 219, false, wnd)
- guiGridListAddColumn(vGrid, "Vehicles list", 0.8)
- addEventHandler("onClientGUIDoubleClick", vGrid, processDoubleClick, false)
- populateGridlist()
- vL1 = guiCreateLabel(11, 204, 345, 15, "_________________________________________________________________________", false, wnd)
- guiSetFont(vL1, "default-bold-small")
- guiLabelSetColor(vL1, 0, 0, 0)
- vIMG = guiCreateStaticImage(11, 28, 167, 116, "VIP.png", false, wnd)
- vL2 = guiCreateLabel(11, 170, 30, 15, "Name:", false, wnd)
- guiSetFont(vL2, "default-small")
- guiLabelSetColor(vL2, 255, 255, 0)
- vL3 = guiCreateLabel(11, 189, 72, 15, "Subscribe Status:", false, wnd)
- guiSetFont(vL3, "default-small")
- guiLabelSetColor(vL3, 255, 255, 0)
- vL4 = guiCreateLabel(11, 149, 114, 15, "Player Informations", false, wnd)
- guiSetFont(vL4, "default-small")
- guiLabelSetColor(vL4, 255, 0, 0)
- vL5 = guiCreateLabel(11, 223, 49, 17, "Vehicles list", false, wnd)
- guiSetFont(vL5, "default-small")
- guiLabelSetColor(vL5, 255, 0, 0)
- vL6 = guiCreateLabel(312, 449, 39, 15, "by Nexus", false, wnd)
- guiSetFont(vL6, "default-small")
- guiLabelSetColor(vL6, 255, 0, 0)
- vL7 = guiCreateLabel(188, 28, 14, 181, "|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|", false, wnd)
- guiSetFont(vL7, "default-small")
- guiLabelSetColor(vL7, 0, 0, 0)
- vL8 = guiCreateLabel(202, 240, 70, 15, "Vehicle Controls", false, wnd)
- guiSetFont(vL8, "default-small")
- guiLabelSetColor(vL8, 255, 0, 0)
- bCreate = guiCreateButton(202, 265, 70, 20, "Create", false, wnd)
- guiSetFont(bCreate, "default-bold-small")
- guiSetProperty(bCreate, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bCreate, "NormalTextColour", "FFFFFF00")
- addEventHandler("onClientGUIClick", bCreate, createVehicleHandler, false)
- bSpawn = guiCreateButton(276, 265, 70, 20, "Spawn", false, wnd)
- guiSetFont(bSpawn, "default-bold-small")
- guiSetProperty(bSpawn, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bSpawn, "NormalTextColour", "FFFFFF00")
- bWarp = guiCreateButton(202, 289, 70, 20, "Warp", false, wnd)
- guiSetFont(bWarp, "default-bold-small")
- guiSetProperty(bWarp, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bWarp, "NormalTextColour", "FFFFFF00")
- bDestroy = guiCreateButton(276, 289, 70, 20, "Destroy", false, wnd)
- guiSetFont(bDestroy, "default-bold-small")
- guiSetProperty(bDestroy, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bDestroy, "NormalTextColour", "FFFFFF00")
- vL9 = guiCreateLabel(202, 353, 145, 15, "_____________________________", false, wnd)
- guiSetFont(vL9, "default-bold-small")
- guiLabelSetColor(vL9, 0, 0, 0)
- bEngine = guiCreateButton(202, 314, 70, 20, "Engine", false, wnd)
- guiSetFont(bEngine, "default-bold-small")
- guiSetProperty(bEngine, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bEngine, "NormalTextColour", "FFFFFF00")
- bLights = guiCreateButton(276, 314, 70, 20, "Lights", false, wnd)
- guiSetFont(bLights, "default-bold-small")
- guiSetProperty(bLights, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bLights, "NormalTextColour", "FFFFFF00")
- bLocks = guiCreateButton(202, 338, 144, 20, "Lock / Unlock", false, wnd)
- guiSetFont(bLocks, "default-bold-small")
- guiSetProperty(bLocks, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bLocks, "NormalTextColour", "FFFFFF00")
- vL10 = guiCreateLabel(202, 373, 39, 15, "Additions", false, wnd)
- guiSetFont(vL10, "default-small")
- guiLabelSetColor(vL10, 255, 0, 0)
- bColors = guiCreateButton(276, 398, 70, 20, "Colors", false, wnd)
- guiSetFont(bColors, "default-bold-small")
- guiSetProperty(bColors, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bColors, "NormalTextColour", "FFFFFF00")
- bSmoke = guiCreateButton(202, 398, 70, 20, "Smoke", false, wnd)
- guiSetFont(bSmoke, "default-bold-small")
- guiSetProperty(bSmoke, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bSmoke, "NormalTextColour", "FFFFFF00")
- bArrow = guiCreateButton(202, 424, 70, 20, "Arrow", false, wnd)
- guiSetFont(bArrow, "default-bold-small")
- guiSetProperty(bArrow, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bArrow, "NormalTextColour", "FFFFFF00")
- bNitrous = guiCreateButton(276, 424, 70, 20, "Nitrous", false, wnd)
- guiSetFont(bNitrous, "default-bold-small")
- guiSetProperty(bNitrous, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bNitrous, "NormalTextColour", "FFFFFF00")
- bCloseWnd = guiCreateButton(336, 23, 15, 15, "\195\151", false, wnd)
- guiSetFont(bCloseWnd, "default-bold-small")
- guiSetProperty(bCloseWnd, "HoverTextColour", "FFFF0000")
- guiSetProperty(bCloseWnd, "NormalTextColour", "FFFF0000")
- bSubscribe = guiCreateButton(276, 23, 60, 15, "Subscribe", false, wnd)
- guiSetFont(bSubscribe, "default-small")
- guiSetProperty(bSubscribe, "HoverTextColour", "FF00FF00")
- guiSetProperty(bSubscribe, "NormalTextColour", "FF00FF00")
- vL11 = guiCreateLabel(202, 48, 65, 15, "Player Controls", false, wnd)
- guiSetFont(vL11, "default-small")
- guiLabelSetColor(vL11, 255, 0, 0)
- bStats = guiCreateButton(202, 73, 144, 20, "VIP Stats", false, wnd)
- guiSetFont(bStats, "default-bold-small")
- guiSetProperty(bStats, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bStats, "NormalTextColour", "FFFFFF00")
- bFS = guiCreateButton(202, 148, 144, 20, "Fighting Style", false, wnd)
- guiSetFont(bFS, "default-bold-small")
- guiSetProperty(bFS, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bFS, "NormalTextColour", "FFFFFF00")
- bHealth = guiCreateButton(202, 99, 70, 20, "Health", false, wnd)
- guiSetFont(bHealth, "default-bold-small")
- guiSetProperty(bHealth, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bHealth, "NormalTextColour", "FFFFFF00")
- bArmor = guiCreateButton(276, 99, 70, 20, "Armor", false, wnd)
- guiSetFont(bArmor, "default-bold-small")
- guiSetProperty(bArmor, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bArmor, "NormalTextColour", "FFFFFF00")
- bWeather = guiCreateButton(202, 124, 70, 20, "Weather", false, wnd)
- guiSetFont(bWeather, "default-bold-small")
- guiSetProperty(bWeather, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bWeather, "NormalTextColour", "FFFFFF00")
- bTime = guiCreateButton(276, 124, 70, 20, "Time", false, wnd)
- guiSetFont(bTime, "default-bold-small")
- guiSetProperty(bTime, "HoverTextColour", "FFFFFF00")
- guiSetProperty(bTime, "NormalTextColour", "FFFFFF00")
- playerN = guiCreateLabel(40, 170, 113, 15, "N/A", false, wnd)
- guiSetFont(playerN, "default-small")
- guiLabelSetColor(playerN, 0, 255, 0)
- playerS = guiCreateLabel(85, 189, 113, 15, "Not Active", false, wnd)
- guiSetFont(playerS, "default-small")
- guiLabelSetColor(playerS, 255, 0, 0)
- wndWeather = guiCreateWindow(695, 159, 234, 197, "Weather", false)
- guiWindowSetSizable(wndWeather, false)
- guiSetVisible(wndWeather, false)
- guiWindowSetMovable(wndWeather, false)
- wCenter(wndWeather)
- guiSetProperty(wndWeather, "CaptionColour", "FFFFFF00")
- wL1 = guiCreateLabel(10, 32, 51, 15, "Set Weather", false, wndWeather)
- guiSetFont(wL1, "default-small")
- guiLabelSetColor(wL1, 255, 0, 0)
- wb1 = guiCreateButton(9, 50, 215, 20, "Blue Skies / Clouds ", false, wndWeather)
- guiSetFont(wb1, "default-bold-small")
- guiSetProperty(wb1, "HoverTextColour", "FFFFFF00")
- guiSetProperty(wb1, "NormalTextColour", "FFFFFF00")
- wb2 = guiCreateButton(9, 98, 216, 20, "Cloudy and Foggy", false, wndWeather)
- guiSetFont(wb2, "default-bold-small")
- guiSetProperty(wb2, "HoverTextColour", "FFFFFF00")
- guiSetProperty(wb2, "NormalTextColour", "FFFFFF00")
- wb3 = guiCreateButton(9, 74, 108, 20, "Stormy", false, wndWeather)
- guiSetFont(wb3, "default-bold-small")
- guiSetProperty(wb3, "HoverTextColour", "FFFFFF00")
- guiSetProperty(wb3, "NormalTextColour", "FFFFFF00")
- wb4 = guiCreateButton(117, 74, 108, 20, "Scorching Hot", false, wndWeather)
- guiSetFont(wb4, "default-bold-small")
- guiSetProperty(wb4, "HoverTextColour", "FFFFFF00")
- guiSetProperty(wb4, "NormalTextColour", "FFFFFF00")
- wb5 = guiCreateButton(9, 122, 108, 20, "Sandstorm", false, wndWeather)
- guiSetFont(wb5, "default-bold-small")
- guiSetProperty(wb5, "HoverTextColour", "FFFFFF00")
- guiSetProperty(wb5, "NormalTextColour", "FFFFFF00")
- wb6 = guiCreateButton(117, 122, 108, 20, "Foggy", false, wndWeather)
- guiSetFont(wb6, "default-bold-small")
- guiSetProperty(wb6, "HoverTextColour", "FFFFFF00")
- guiSetProperty(wb6, "NormalTextColour", "FFFFFF00")
- wb7 = guiCreateButton(9, 146, 216, 20, "Very Dull, Colourless, Hazy ", false, wndWeather)
- guiSetFont(wb7, "default-bold-small")
- guiSetProperty(wb7, "HoverTextColour", "FFFFFF00")
- guiSetProperty(wb7, "NormalTextColour", "FFFFFF00")
- wb8 = guiCreateButton(9, 170, 216, 20, "Dull, Cloudy, Rainy", false, wndWeather)
- guiSetFont(wb8, "default-bold-small")
- guiSetProperty(wb8, "HoverTextColour", "FFFFFF00")
- guiSetProperty(wb8, "NormalTextColour", "FFFFFF00")
- wbClose = guiCreateButton(209, 21, 15, 15, "\195\151", false, wndWeather)
- guiSetFont(wbClose, "default-bold-small")
- guiSetProperty(wbClose, "HoverTextColour", "FFFF0000")
- guiSetProperty(wbClose, "NormalTextColour", "FFFF0000")
- wndTime = guiCreateWindow(695, 361, 234, 81, "Time", false)
- guiWindowSetSizable(wndTime, false)
- guiSetVisible(wndTime, false)
- guiWindowSetMovable(wndTime, false)
- tCenter(wndTime)
- guiSetProperty(wndTime, "CaptionColour", "FFFFFF00")
- tL1 = guiCreateLabel(10, 30, 41, 15, "Set Time", false, wndTime)
- guiSetFont(tL1, "default-small")
- guiLabelSetColor(tL1, 255, 0, 0)
- Hours = guiCreateEdit(41, 49, 30, 22, "12", false, wndTime)
- guiEditSetMaxLength(Hours, 2)
- Minutes = guiCreateEdit(114, 49, 30, 22, "00", false, wndTime)
- guiEditSetMaxLength(Minutes, 2)
- tL2 = guiCreateLabel(10, 55, 27, 16, "Hours:", false, wndTime)
- guiSetFont(tL2, "default-small")
- guiLabelSetColor(tL2, 0, 255, 0)
- tL3 = guiCreateLabel(76, 55, 34, 16, "Minutes:", false, wndTime)
- guiSetFont(tL3, "default-small")
- guiLabelSetColor(tL3, 0, 255, 0)
- tbSetTime = guiCreateButton(154, 49, 70, 22, "Set", false, wndTime)
- guiSetFont(tbSetTime, "default-bold-small")
- guiSetProperty(tbSetTime, "HoverTextColour", "FFFFFF00")
- guiSetProperty(tbSetTime, "NormalTextColour", "FFFFFF00")
- tbClose = guiCreateButton(209, 24, 16, 15, "\195\151", false, wndTime)
- guiSetFont(tbClose, "default-bold-small")
- guiSetProperty(tbClose, "HoverTextColour", "FFFF0000")
- guiSetProperty(tbClose, "NormalTextColour", "FFFF0000")
- wndFStyle = guiCreateWindow(695, 447, 234, 134, "Fighting Style", false)
- guiWindowSetSizable(wndFStyle, false)
- guiSetVisible(wndFStyle, false)
- guiWindowSetMovable(wndFStyle, false)
- fsCenter(wndFStyle)
- guiSetProperty(wndFStyle, "CaptionColour", "FFFFFF00")
- fsL1 = guiCreateLabel(10, 35, 75, 15, "Set Fighting Style", false, wndFStyle)
- guiSetFont(fsL1, "default-small")
- guiLabelSetColor(fsL1, 255, 0, 0)
- fsb1 = guiCreateButton(10, 56, 108, 20, "Standdard", false, wndFStyle)
- guiSetFont(fsb1, "default-bold-small")
- guiSetProperty(fsb1, "HoverTextColour", "FFFFFF00")
- guiSetProperty(fsb1, "NormalTextColour", "FFFFFF00")
- fsb2 = guiCreateButton(10, 80, 108, 20, "Kung Fu", false, wndFStyle)
- guiSetFont(fsb2, "default-bold-small")
- guiSetProperty(fsb2, "HoverTextColour", "FFFFFF00")
- guiSetProperty(fsb2, "NormalTextColour", "FFFFFF00")
- fsb3 = guiCreateButton(10, 104, 108, 20, "Grab Kick", false, wndFStyle)
- guiSetFont(fsb3, "default-bold-small")
- guiSetProperty(fsb3, "HoverTextColour", "FFFFFF00")
- guiSetProperty(fsb3, "NormalTextColour", "FFFFFF00")
- fsb4 = guiCreateButton(117, 56, 108, 20, "Boxing", false, wndFStyle)
- guiSetFont(fsb4, "default-bold-small")
- guiSetProperty(fsb4, "HoverTextColour", "FFFFFF00")
- guiSetProperty(fsb4, "NormalTextColour", "FFFFFF00")
- fsb5 = guiCreateButton(117, 80, 108, 20, "Knee Head", false, wndFStyle)
- guiSetFont(fsb5, "default-bold-small")
- guiSetProperty(fsb5, "HoverTextColour", "FFFFFF00")
- guiSetProperty(fsb5, "NormalTextColour", "FFFFFF00")
- fsb6 = guiCreateButton(117, 104, 108, 20, "Elbows", false, wndFStyle)
- guiSetFont(fsb6, "default-bold-small")
- guiSetProperty(fsb6, "HoverTextColour", "FFFFFF00")
- guiSetProperty(fsb6, "NormalTextColour", "FFFFFF00")
- fsbClose = guiCreateButton(209, 23, 15, 15, "\195\151", false, wndFStyle)
- guiSetFont(fsbClose, "default-bold-small")
- guiSetProperty(fsbClose, "HoverTextColour", "FFFF0000")
- guiSetProperty(fsbClose, "NormalTextColour", "FFFF0000")
- end
- )
- addEventHandler("onClientGUIClick", root, function()
- if source == bCloseWnd then
- guiSetVisible(wnd, false)
- guiSetVisible(wndWeather, false)
- guiSetVisible(wndTime, false)
- guiSetVisible(wndFStyle, false)
- showCursor(false)
- elseif source == bSpawn then
- triggerServerEvent("Spawn", localPlayer)
- elseif source == bWarp then
- triggerServerEvent("Warp", localPlayer)
- elseif source == bDestroy then
- triggerServerEvent("Destroy", localPlayer)
- elseif source == bArrow then
- triggerServerEvent("Arrow", localPlayer)
- elseif source == bColors then
- triggerServerEvent("Colors", localPlayer)
- elseif source == bSmoke then
- triggerServerEvent("Smoke", localPlayer)
- elseif source == bEngine then
- triggerServerEvent("Engine", localPlayer)
- elseif source == bLights then
- triggerServerEvent("Lights", localPlayer)
- elseif source == bLocks then
- triggerServerEvent("Locks", localPlayer)
- elseif source == bNitrous then
- triggerServerEvent("Nitrous", localPlayer)
- elseif source == bHealth then
- triggerServerEvent("Health", localPlayer)
- elseif source == bArmor then
- triggerServerEvent("Armor", localPlayer)
- elseif source == bStats then
- triggerServerEvent("Stats", localPlayer)
- elseif source == bWeather then
- local l_6_0 = guiGetVisible(wndWeather)
- guiSetVisible(wndWeather, not l_6_0)
- elseif source == bTime then
- local l_6_1 = guiGetVisible(wndTime)
- guiSetVisible(wndTime, not l_6_1)
- elseif source == bFS then
- local l_6_2 = guiGetVisible(wndFStyle)
- guiSetVisible(wndFStyle, not l_6_2)
- elseif source == wb1 then
- setWeather(math.random(0, 7))
- outputChatBox("Weather has been set to Blue Skies / Clouds.", 0, 255, 0)
- elseif source == wb2 then
- setWeather(9)
- outputChatBox("Weather has been set to Cloudy and Foggy.", 0, 255, 0)
- elseif source == wb3 then
- setWeather(8)
- outputChatBox("Weather has been set to Stormy.", 0, 255, 0)
- elseif source == wb4 then
- setWeather(math.random(17, 18))
- outputChatBox("Weather has been set to Scorching Hot.", 0, 255, 0)
- elseif source == wb5 then
- setWeather(19)
- outputChatBox("Weather has been set to Sandstorm.", 0, 255, 0)
- elseif source == wb6 then
- setWeather(20)
- outputChatBox("Weather has been set to Foggy.", 0, 255, 0)
- elseif source == wb7 then
- setWeather(math.random(12, 15))
- outputChatBox("Weather has been set to Very Dull, Colourless, Hazy.", 0, 255, 0)
- elseif source == wb8 then
- setWeather(16)
- outputChatBox("Weather has been set to Dull, Cloudy, Rainy.", 0, 255, 0)
- elseif source == wbClose then
- guiSetVisible(wndWeather, false)
- elseif source == tbSetTime then
- local l_6_3 = guiGetText(Hours)
- local l_6_4 = guiGetText(Minutes)
- if l_6_3 and l_6_4 then
- setTime(l_6_3, l_6_4)
- outputChatBox("Time changed successfully.", 0, 255, 0)
- end
- elseif source == tbClose then
- guiSetVisible(wndTime, false)
- elseif source == fsb1 then
- triggerServerEvent("SetFStyle", localPlayer, 4)
- outputChatBox("Fighting style has been set to Standard.", 0, 255, 0)
- elseif source == fsb2 then
- triggerServerEvent("SetFStyle", localPlayer, 6)
- outputChatBox("Fighting style has been set to Kung Fu.", 0, 255, 0)
- elseif source == fsb3 then
- triggerServerEvent("SetFStyle", localPlayer, 16)
- outputChatBox("Fighting style has been set to Grab Kick.", 0, 255, 0)
- elseif source == fsb4 then
- triggerServerEvent("SetFStyle", localPlayer, 5)
- outputChatBox("Fighting style has been set to Boxing.", 0, 255, 0)
- elseif source == fsb5 then
- triggerServerEvent("SetFStyle", localPlayer, 7)
- outputChatBox("Fighting style has been set to Knee Head.", 0, 255, 0)
- elseif source == fsb6 then
- triggerServerEvent("SetFStyle", localPlayer, 17)
- outputChatBox("Fighting style has been set to Elbows.", 0, 255, 0)
- elseif source == fsbClose then
- guiSetVisible(wndFStyle, false)
- end
- end
- )
- createVehicleHandler = function(l_7_0, l_7_1)
- if l_7_0 == "left" and l_7_1 == "up" then
- local l_7_2, l_7_3 = guiGridListGetSelectedItem(vGrid)
- if l_7_2 and l_7_3 and l_7_2 ~= -1 and l_7_3 ~= -1 then
- local l_7_4 = guiGridListGetItemData(vGrid, l_7_2, l_7_3)
- l_7_4 = tonumber(l_7_4)
- local l_7_5 = getLocalPlayer()
- local l_7_6, l_7_7, l_7_8 = getElementPosition(l_7_5)
- if l_7_4 and l_7_6 and l_7_7 and l_7_8 then
- triggerServerEvent("createVehicleFromGUI", l_7_5, l_7_4, l_7_6, l_7_7, l_7_8)
- else
- outputChatBox("Invalid arguments.")
- end
- else
- outputChatBox("Please select a vehicle.")
- end
- end
- end
- populateGridlist = function()
- local l_8_0 = xmlLoadFile("vehicles.xml")
- if l_8_0 then
- xmlUnloadFile(l_8_0)
- end
- end
- populateGridlist = function()
- local l_9_0 = xmlLoadFile("vehicles.xml")
- if l_9_0 then
- for l_9_4,l_9_5 in ipairs(xmlNodeGetChildren(l_9_0)) do
- local l_9_6 = guiGridListAddRow(vGrid)
- local l_9_7 = xmlNodeGetAttribute(l_9_5, "type")
- guiGridListSetItemText(vGrid, l_9_6, 1, l_9_7, true, false)
- for l_9_11,l_9_12 in ipairs(xmlNodeGetChildren(l_9_5)) do
- l_9_6 = guiGridListAddRow(vGrid)
- l_9_7 = xmlNodeGetAttribute(l_9_12, "name")
- local l_9_13 = xmlNodeGetAttribute(l_9_12, "id")
- guiGridListSetItemText(vGrid, l_9_6, 1, l_9_7, false, false)
- guiGridListSetItemText(vGrid, l_9_6, 2, getVehicleType(tonumber(l_9_13)), false, false)
- guiGridListSetItemData(vGrid, l_9_6, 1, tostring(l_9_13))
- end
- end
- xmlUnloadFile(l_9_0)
- end
- end
- processDoubleClick = function(l_10_0, l_10_1)
- if l_10_0 == "left" and l_10_1 == "up" then
- local l_10_2, l_10_3 = guiGridListGetSelectedItem(vGrid)
- if l_10_2 and l_10_3 and l_10_2 ~= -1 and l_10_3 ~= -1 and guiGridListGetItemData(vGrid, l_10_2, l_10_3) == "header" then
- local l_10_4 = guiGridListGetItemText(vGrid, l_10_2, l_10_3)
- changeGridlistState(l_10_4)
- end
- end
- end
- changeGridlistState = function(l_11_0)
- if l_11_0 then
- if getElementData(vGrid, "expanded") == l_11_0 then
- guiGridListClear(vGrid)
- for l_11_4,l_11_5 in pairs(vehicleTable) do
- local l_11_6 = guiGridListAddRow(vGrid)
- guiGridListSetItemText(vGrid, l_11_6, 1, l_11_4, false, false)
- guiGridListSetItemData(vGrid, l_11_6, 1, "header")
- end
- setElementData(vGrid, "expanded", "none")
- else
- guiGridListClear(vGrid)
- local l_11_7 = guiGridListAddRow(vGrid)
- guiGridListSetItemText(vGrid, l_11_7, 1, l_11_0, false, false)
- guiGridListSetItemData(vGrid, l_11_7, 1, "header")
- for l_11_11,l_11_12 in ipairs(vehicleTable[l_11_0]) do
- l_11_7 = guiGridListAddRow(vGrid)
- guiGridListSetItemText(vGrid, l_11_7, 1, "- " .. l_11_12[2], false, false)
- guiGridListSetItemData(vGrid, l_11_7, 1, tostring(l_11_12[1]))
- end
- setElementData(vGrid, "expanded", l_11_0)
- end
- end
- end
- populateGridlist = function()
- local l_12_0 = xmlLoadFile("vehicles.xml")
- vehicleTable = {}
- if l_12_0 then
- for l_12_4,l_12_5 in ipairs(xmlNodeGetChildren(l_12_0)) do
- local l_12_6 = guiGridListAddRow(vGrid)
- local l_12_7 = xmlNodeGetAttribute(l_12_5, "type")
- guiGridListSetItemText(vGrid, l_12_6, 1, l_12_7, false, false)
- vehicleTable[l_12_7] = {}
- guiGridListSetItemData(vGrid, l_12_6, 1, "header")
- for l_12_11,l_12_12 in ipairs(xmlNodeGetChildren(l_12_5)) do
- local l_12_13 = xmlNodeGetAttribute(l_12_12, "name")
- local l_12_14 = xmlNodeGetAttribute(l_12_12, "id")
- table.insert(vehicleTable[l_12_7], {l_12_14, l_12_13})
- end
- end
- setElementData(vGrid, "expanded", "none")
- xmlUnloadFile(l_12_0)
- end
- end
- open = function()
- triggerServerEvent("showwindow", getLocalPlayer())
- triggerServerEvent("status", getLocalPlayer())
- end
- bindKey("Z", "down", open)
- vip = function()
- if guiGetVisible(wnd) then
- guiSetVisible(wnd, false)
- guiSetVisible(wndWeather, false)
- guiSetVisible(wndTime, false)
- guiSetVisible(wndFStyle, false)
- showCursor(false)
- elseif not getElementData(localPlayer, "isBlocked") == true then
- guiSetVisible(wnd, true)
- showCursor(true)
- end
- end
- addEvent("showwindow", true)
- addEventHandler("showwindow", getRootElement(), vip)
- vip1 = function()
- if guiGetVisible(playerS, true) then
- guiSetText(playerS, "Active")
- guiLabelSetColor(playerS, 0, 255, 0)
- if guiGetEnabled(vGrid) == false and guiGetEnabled(bSpawn) == false and guiGetEnabled(bCreate) == false and guiGetEnabled(bWarp) == false and guiGetEnabled(bDestroy) == false and guiGetEnabled(bLights) == false and guiGetEnabled(bLocks) == false and guiGetEnabled(bEngine) == false and guiGetEnabled(bSmoke) == false and guiGetEnabled(bArrow) == false and guiGetEnabled(bColors) == false and guiGetEnabled(bNitrous) == false and guiGetEnabled(bStats) == false and guiGetEnabled(bArmor) == false and guiGetEnabled(bHealth) == false and guiGetEnabled(bWeather) == false and guiGetEnabled(bTime) == false and guiGetEnabled(bFS) == false then
- guiSetEnabled(bSpawn, true)
- guiSetEnabled(bCreate, true)
- guiSetEnabled(bWarp, true)
- guiSetEnabled(bDestroy, true)
- guiSetEnabled(bLights, true)
- guiSetEnabled(bLocks, true)
- guiSetEnabled(vGrid, true)
- guiSetEnabled(bEngine, true)
- guiSetEnabled(bSmoke, true)
- guiSetEnabled(bColors, true)
- guiSetEnabled(bNitrous, true)
- guiSetEnabled(bArrow, true)
- guiSetEnabled(bStats, true)
- guiSetEnabled(bHealth, true)
- guiSetEnabled(bArmor, true)
- guiSetEnabled(bWeather, true)
- guiSetEnabled(bTime, true)
- guiSetEnabled(bFS, true)
- end
- end
- end
- addEvent("status", true)
- addEventHandler("status", getRootElement(), vip1)
- vip2 = function()
- if guiGetVisible(playerS, true) then
- guiSetText(playerS, "Not Active")
- guiLabelSetColor(playerS, 255, 0, 0)
- if guiGetEnabled(vGrid) == true and guiGetEnabled(bSpawn) == true and guiGetEnabled(bCreate) == true and guiGetEnabled(bWarp) == true and guiGetEnabled(bDestroy) == true and guiGetEnabled(bLights) == true and guiGetEnabled(bLocks) == true and guiGetEnabled(bEngine) == true and guiGetEnabled(bSmoke) == true and guiGetEnabled(bArrow) == true and guiGetEnabled(bColors) == true and guiGetEnabled(bNitrous) == true and guiGetEnabled(bStats) == true and guiGetEnabled(bArmor) == true and guiGetEnabled(bHealth) == true and guiGetEnabled(bWeather) == true and guiGetEnabled(bTime) == true and guiGetEnabled(bFS) == true then
- guiSetEnabled(bSpawn, false)
- guiSetEnabled(bCreate, false)
- guiSetEnabled(bWarp, false)
- guiSetEnabled(bDestroy, false)
- guiSetEnabled(bLights, false)
- guiSetEnabled(bLocks, false)
- guiSetEnabled(vGrid, false)
- guiSetEnabled(bEngine, false)
- guiSetEnabled(bSmoke, false)
- guiSetEnabled(bColors, false)
- guiSetEnabled(bNitrous, false)
- guiSetEnabled(bArrow, false)
- guiSetEnabled(bStats, false)
- guiSetEnabled(bHealth, false)
- guiSetEnabled(bArmor, false)
- guiSetEnabled(bWeather, false)
- guiSetEnabled(bTime, false)
- guiSetEnabled(bFS, false)
- end
- end
- end
- addEvent("statusF", true)
- addEventHandler("statusF", getRootElement(), vip2)
- name = function()
- if guiGetVisible(playerN, true) then
- guiSetText(playerN, " " .. getPlayerName(getLocalPlayer()):gsub("#%x%x%x%x%x%x", ""))
- else
- guiSetText(playerN, " N/A")
- end
- end
- addEventHandler("onClientRender", getRootElement(), name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement