0 Üye ve 1 Ziyaretçi konuyu incelemekte.
----------------------------- Işınlanma Kapat---------------------------function warponoff( ) if ( guiCheckBoxGetSelected( getControl( wndMain, 'Işınlanma Kapat' ) ) == true ) then setElementData(g_Me,"Isinlanma",true) else setElementData(g_Me,"Isinlanma",false) endend
{"chk"; id = "Işınlanma Kapat", onclick = toggleGod, x = 15},
benim demek istediğim ışınlanmayı kapatma değildir.
Yani senin istediğin yardımla bağlantılı o yüzden attım.Adam yanına ışınlanamazsa jantlarla vb. oynayamaz
function panel_ac_kapa()if getPedOccupiedVehicleSeat (getLocalPlayer()) == 0 then return outputChatBox("#cc0000Araç Kontrol Panelini Sadece araç sahibi kullanabilir.", 255, 255, 255, true)elseif (guiGetVisible(basma) == false) thenif getPedOccupiedVehicle (getLocalPlayer()) thenguiSetVisible(basma, true)showCursor(true)endelseguiSetVisible(basma, false)showCursor(false)endendbindKey("F5", "down", panel_ac_kapa)
local customKills = {}local config = {["lines"] = 5,["startY"] = 0.35,["textHeight"] = 16,["iconPosOffY"] = -10,["iconHeight"] = 20,["iconSpacing"] = 4,["defaultWeapon"] = 255,["fadeTime"] = 5000,["startFade"] = 15000,["align"] = "right",["startX"] = -10}screenx,screeny = guiGetScreenSize()width, height = 790, 350x, y = (screenx/2-width/2), (screeny/2-height/2)function shopInterface()basma = guiCreateStaticImage(x, y, width, height, "resim/panel1.png", false)guiSetVisible(basma, false)--panel_adi = guiCreateStaticImage(0, 0, width, 25, "resim/panel.png", false, basma)panel_adii = guiCreateLabel(0, -8, width, 25, "Araç Kontrol Paneli", false, panel_adi)guiLabelSetHorizontalAlign(panel_adii, "center")guiLabelSetVerticalAlign(panel_adii, "bottom")guiSetFont(panel_adii, "default-bold-small")guiLabelSetColor(panel_adii, 255, 255, 255)--guiCreateStaticImage(25, 65, 210, 235, "resim/arrow.png", false, basma)kaput = guiCreateStaticImage(107, 30, 45, 34, "resim/yukari.png", false, basma)solon = guiCreateStaticImage(5, 135, 34, 45, "resim/sol.png", false, basma)solarka = guiCreateStaticImage(5, 190, 34, 45, "resim/sol.png", false, basma)bagaj = guiCreateStaticImage(107, 300, 45, 34, "resim/asagi.png", false, basma)sagon = guiCreateStaticImage(220, 135, 34, 45, "resim/sag.png", false, basma)sagarka = guiCreateStaticImage(220, 190, 34, 45, "resim/sag.png", false, basma)--guiCreateStaticImage(265, 135, 235, 82, "resim/car.png", false, basma)bas = guiCreateStaticImage(325, 230, 45, 34, "resim/asagi.png", false, basma)yukselt = guiCreateStaticImage(390, 230, 45, 34, "resim/yukari.png", false, basma)--guiCreateStaticImage(575, 60, 150, 250, "resim/car2.png", false, basma)------------------------------------------------------------------------peredlevoeP = guiCreateStaticImage(750, 210, 30, 40, "resim/sag.png", false, basma)peredlevoeV = guiCreateStaticImage(710, 210, 30, 40, "resim/sol.png", false, basma)------------------------------------------------------------------------peredpravoV = guiCreateStaticImage(525, 210, 30, 40, "resim/sol.png", false, basma)peredpravoP = guiCreateStaticImage(560, 210, 30, 40, "resim/sag.png", false, basma)------------------------------------------------------------------------zadlevoeP = guiCreateStaticImage(745, 100, 30, 40, "resim/sag.png", false, basma)zadlevoeV = guiCreateStaticImage(705, 100, 30, 40, "resim/sol.png", false, basma)------------------------------------------------------------------------zadpravoeV = guiCreateStaticImage(525, 100, 30, 40, "resim/sol.png", false, basma)zadpravoeP = guiCreateStaticImage(560, 100, 30, 40, "resim/sag.png", false, basma)------------------------------------------------------------------------endaddEventHandler("onClientResourceStart", resourceRoot, shopInterface)addEventHandler("onClientGUIClick",root,function ( x, y )if source == kaput thentriggerServerEvent ("porta1", getLocalPlayer())elseif source == solon thentriggerServerEvent ("porta2", getLocalPlayer())elseif source == sagon thentriggerServerEvent ("porta3", getLocalPlayer())elseif source == sagarka thentriggerServerEvent ("porta4", getLocalPlayer())elseif source == solarka thentriggerServerEvent ("porta5", getLocalPlayer())elseif source == bagaj thentriggerServerEvent ("porta6", getLocalPlayer())elseif source == yukselt thentriggerServerEvent ("subir", getLocalPlayer())playSound('sesler/bas.mp3')elseif source == bas thentriggerServerEvent ("descer", getLocalPlayer())playSound('sesler/bas.mp3')endend)-- EKLENEN --function panel_ac_kapa()if getPedOccupiedVehicleSeat (getLocalPlayer()) == 0 then return outputChatBox("#cc0000Araç Kontrol Panelini Sadece araç sahibikullanabilir.", 255, 255, 255, true)elseif (guiGetVisible(basma) == false) thenif getPedOccupiedVehicle (getLocalPlayer()) thenguiSetVisible(basma, true)showCursor(true)endelseguiSetVisible(basma, false)showCursor(false)endendbindKey("F5", "down", panel_ac_kapa)function onGuiClick(button)if button == "left" thenif source == bOpenHood thenlocal door = 0local move_door = 1triggerServerEvent("moveDoorVeh", getLocalPlayer(), door, move_door)----------------------------------------------------------------------------------------------------------------------------------------- Arka Sağ -------------------------------------------------------------------------------------------------------------------------------------------------elseif source == zadpravoeP thenlocal theVeh = getPedOccupiedVehicle(localPlayer)local getComponent = getVehicleComponents(theVeh)if (theVeh) thenfor steklo4 in pairs (getComponent) dolocal x, y, z = getVehicleComponentPosition(theVeh, "wheel_rb_dummy")setVehicleComponentPosition(theVeh, "wheel_rb_dummy", x-0.0005, y, z)endendelseif source == zadpravoeV thenlocal theVeh = getPedOccupiedVehicle(localPlayer)local getComponent = getVehicleComponents(theVeh)if (theVeh) thenfor steklo4 in pairs (getComponent) dolocal x, y, z = getVehicleComponentPosition(theVeh, "wheel_rb_dummy")setVehicleComponentPosition(theVeh, "wheel_rb_dummy", x+0.0005, y, z)endend----------------------------------------------------------------------------------------------------------------------------------------- Arka Sol -------------------------------------------------------------------------------------------------------------------------------------------------elseif source == zadlevoeP thenlocal theVeh = getPedOccupiedVehicle(localPlayer)local getComponent = getVehicleComponents(theVeh)if (theVeh) thenfor steklo4 in pairs (getComponent) dolocal x, y, z = getVehicleComponentPosition(theVeh, "wheel_lb_dummy")setVehicleComponentPosition(theVeh, "wheel_lb_dummy", x-0.0005, y, z)endendelseif source == zadlevoeV thenlocal theVeh = getPedOccupiedVehicle(localPlayer)local getComponent = getVehicleComponents(theVeh)if (theVeh) thenfor steklo4 in pairs (getComponent) dolocal x, y, z = getVehicleComponentPosition(theVeh, "wheel_lb_dummy")setVehicleComponentPosition(theVeh, "wheel_lb_dummy", x+0.0005, y, z)endend----------------------------------------------------------------------------------------------------------------------------------------- ÖN Sağ -------------------------------------------------------------------------------------------------------------------------------------------------elseif source == peredpravoP thenlocal theVeh = getPedOccupiedVehicle(localPlayer)local getComponent = getVehicleComponents(theVeh)if (theVeh) thenfor steklo2 in pairs (getComponent) dolocal x, y, z = getVehicleComponentPosition(theVeh, "wheel_rf_dummy")setVehicleComponentPosition(theVeh, "wheel_rf_dummy", x-0.0005, y, z)endendelseif source == peredpravoV thenlocal theVeh = getPedOccupiedVehicle(localPlayer)local getComponent = getVehicleComponents(theVeh)if (theVeh) thenfor steklo2 in pairs (getComponent) dolocal x, y, z = getVehicleComponentPosition(theVeh, "wheel_rf_dummy")setVehicleComponentPosition(theVeh, "wheel_rf_dummy", x+0.0005, y, z)endend ----------------------------------------------------------------------------------------------------------------------------------------- ÖN Sol -------------------------------------------------------------------------------------------------------------------------------------------------elseif source == peredlevoeP thenlocal theVeh = getPedOccupiedVehicle(localPlayer)local getComponent = getVehicleComponents(theVeh)if (theVeh) thenfor steklo1 in pairs (getComponent) dolocal x, y, z = getVehicleComponentPosition(theVeh, "wheel_lf_dummy")setVehicleComponentPosition(theVeh, "wheel_lf_dummy", x-0.0005, y, z)endendelseif source == peredlevoeV thenlocal theVeh = getPedOccupiedVehicle(localPlayer)local getComponent = getVehicleComponents(theVeh)if (theVeh) thenfor steklo1 in pairs (getComponent) dolocal x, y, z = getVehicleComponentPosition(theVeh, "wheel_lf_dummy")setVehicleComponentPosition(theVeh, "wheel_lf_dummy", x+0.0005, y, z)endend elseif source == bCloseMenu thenhideVehGUI()endendendaddEventHandler("onClientGUIClick", getRootElement(), onGuiClick)local default = {["lines"] = 5,["startY"] = 0.25,["textHeight"] = 16,["iconPosOffY"] = -10,["iconHeight"] = 20,["iconSpacing"] = 4,["defaultWeapon"] = 255,["fadeTime"] = 5000,["startFade"] = 15000,["align"] = "right",["startX"] = -10}local endTimelocal screenX,screenY = guiGetScreenSize ()local contentMessages = {}local fadingLines = {}---local iconOrder = {}function setupTextOnStart ( resource )if resource ~= getThisResource() then return endtriggerServerEvent ( "onClientKillmessagesLoaded", getLocalPlayer() )endaddEventHandler ( "onClientResourceStart", getRootElement(), setupTextOnStart )addEvent ("doSetKillMessageStyle",true)function setKillMessageStyle ( startX,startY,align,lines,fadeStart,fadeAnimTime )if ( not startX ) then startX = default.startX endif ( not startY ) then startY = default.startY endif ( not align ) then align = default.align endif ( not lines ) then lines = default.lines endif ( not fadeStart ) then fadeStart = default.startFade endif ( not fadeAnimTime ) then fadeAnimTime = default.fadeTime endconfig.startX = startXconfig.startY = startYconfig.align = alignconfig.lines = linesconfig.startFade = fadeStartconfig.fadeTime = fadeAnimTimeif #contentMessages ~= 0 thenfor i=1,config.lines doif contentMessages[i] thendestroyLine ( i )endendendfadingLines = {}killMessages = {}if ( config.startY < 0 ) thenconfig.startY = screenY - math.abs(config.startY*screenY) - (config.iconHeight*config.lines)config.startY = config.startY/screenYendcreateKillMessageGUI()return trueendaddEventHandler ( "doSetKillMessageStyle",getRootElement(),setKillMessageStyle)function createKillMessageGUI()local gap = config.iconHeight - config.textHeightgap = gap/2for i=1,config.lines dolocal y = config.startY*screenY + (config.iconHeight*(i-1))y = y + gapcontentMessages[i] = { dxText:create("",0,y) }endendTime = config.fadeTime + config.startFadeendfunction shiftUpGUI()local i = 1for i=config.lines,2,-1 dolocal y = config.startY*screenY + (config.iconHeight*(i-1)) + (config.iconHeight - config.textHeight)/2local targetY = config.startY*screenY + (config.iconHeight*(i-2)) + (config.iconHeight - config.textHeight)/2if contentMessages[i] thenfor k,part in ipairs(contentMessages[i]) dolocal x,realY = getWidgetPosition(part)local diffY = realY - ysetWidgetPosition(part,x,targetY + diffY)endendendfor i=1,config.lines-1 do---shift up the alpha toolocal tick = fadingLines[i+1]fadingLines[i] = tickfadingLines[i+1] = nilendendaddEvent ( "doOutputMessage", true )function outputMessage ( message, r, g, b, font )if type(message) ~= "string" and type(message) ~= "table" thenoutputDebugString ( "outputMessage - Bad 'message' argument", 0, 112, 112, 112 ) return false endif type(font) ~= "string" then font = "default"endr = tonumber(r) or 255g = tonumber(g) or 255b = tonumber(b) or 255---shift everything upshiftUpGUI()--Delete the first linedestroyLine (1)table.remove ( contentMessages, 1 )if type(message) == "string" thenmessage = {message}endlocal y = config.startY*screenY + (config.iconHeight*(config.lines-1)) + (config.iconHeight - config.textHeight)/2local startX = config.startXif startX < 1 and startX > -1 then --auto calculate whether its relative or absolutestartX = screenX/startX --make it relativeendif startX < 0 thenstartX = screenX + startXendfor i,part in ipairs(message) doif type(part) == "table" and part[1] == "image" thenif not part.resource and not part.resourceName thenpart.resource = sourceResourceendendenddrawLine ( message, startX, y, config.align, config.lines, r, g, b, font, 1 )fadeLine ( config.lines )endaddEventHandler ( "doOutputMessage", getRootElement(), outputMessage )function drawLine ( message, x,y, align, line, r, g, b, font, scale )--First draw it and work out the widthlocal width = 0contentMessages[line] = {}for i,part in ipairs(message) doif type(part) == "string" thenlocal text = dxText:create ( part, width, y, false )text:font ( font )text:scale ( scale )text:type("shadow",1)text:align"left"text:color ( r,g,b )table.insert ( contentMessages[line], text )width = width + text:extent()elseif part[1] == "icon" thenlocal iconWidth = part.width or iconWidths[part.id or -1] or iconWidths[255]local iconHeight = part.height or config.iconHeightlocal image = dxImage:create ( icons[part.id or 0] or icons[255], width, y + (part.posOffY or config.iconPosOffY), iconWidth, iconHeight, false )image:color ( part.r or 255, part.g or 255, part.b or 255 )image:rotation ( part.rot or 0, part.rotOffX or 0, part.rotOffY or 0 )width = width + iconWidthtable.insert ( contentMessages[line], image )elseif part[1] == "image" thenif part.width and part.path thenif part.resourceName thenpart.resource = getResourceFromName(tostring(part.resourceName)) or part.resourceendlocal image = dxImage:create ( ":"..getResourceName(part.resource).."/"..part.path, width, y + (part.posOffY or config.iconPosOffY), part.width, part.height or config.iconHeight, false )image:color ( part.r or 255, part.g or 255, part.b or 255 )image:rotation ( part.rot or 0, part.rotOffX or 0, part.rotOffY or 0 )width = width + part.widthtable.insert ( contentMessages[line], image )endelseif part[1] == "color" or part[1] == "colour" thenr = part.r or rg = part.g or gb = part.b or belseif part[1] == "padding" thenwidth = width + part.width or 0endcontentMessages[line].scale = scaleend--Now reposition everything properlyif align == "center" or align == "centre" thenx = x - width/2elseif align == "right" thenx = x - widthendfor i,widget in ipairs(contentMessages[line]) dolocal wx,wy = getWidgetPosition ( widget )setWidgetPosition ( widget, x + wx, wy )endreturn trueendfunction fadeLine ( line )setLineAlpha ( line, 1 )fadingLines[line] = getTickCount()end-----addEventHandler ( "onClientRender",getRootElement(),function()for line,originalTick in pairs(fadingLines) dolocal tickDifference = getTickCount() - originalTickif tickDifference > endTime thendestroyLine ( line )setLineAlpha ( line, 1 )fadingLines[line] = nilelseif tickDifference >config.startFade thenlocal fadeTimeDifference = tickDifference - config.startFade--calculate the alphalocal newAlpha = 1 - fadeTimeDifference/config.fadeTime--Set all the alphassetLineAlpha ( line, newAlpha )endendend )function setLineAlpha ( line, alpha )for i,part in ipairs(contentMessages[line]) dosetWidgetAlpha ( part, alpha )endendfunction destroyLine ( line )for k,part in ipairs(contentMessages[line]) dodestroyWidget(part)endcontentMessages[line] = {}endfunction destroyWidget ( widget )if isElement(widget) thendestroyElement ( widget )elseif type(widget) == "table" and widget.destroy thenwidget:destroy()endendfunction getWidgetPosition ( widget )if isElement(widget) thenreturn guiGetPosition ( widget, false )elseif type(widget) == "table" and widget.position thenreturn widget:position()endendfunction setWidgetPosition ( widget, x, y )if isElement(widget) thenreturn guiSetPosition ( widget, x, y, false )elseif type(widget) == "table" and widget.position thenreturn widget:position(x,y,false)endendfunction setWidgetAlpha ( widget, alpha )if isElement(widget) thenguiSetAlpha ( widget, alpha )elseif type(widget) == "table" and widget.color thenlocal r,g,b = widget:color()widget:color(r,g,b,alpha*255)endend
screenx,screeny = guiGetScreenSize()width, height = 790, 350x, y = (screenx/2-width/2), (screeny/2-height/2)function shopInterface() basma = guiCreateStaticImage(x, y, width, height, "resim/panel1.png", false) guiSetVisible(basma, false)--panel_adi = guiCreateStaticImage(0, 0, width, 25, "resim/panel.png", false, basma)panel_adii = guiCreateLabel(0, -8, width, 25, "Araç Kontrol Paneli", false, panel_adi)guiLabelSetHorizontalAlign(panel_adii, "center")guiLabelSetVerticalAlign(panel_adii, "bottom")guiSetFont(panel_adii, "default-bold-small")guiLabelSetColor(panel_adii, 255, 255, 255)-- guiCreateStaticImage(25, 65, 210, 235, "resim/arrow.png", false, basma) kaput = guiCreateStaticImage(107, 30, 45, 34, "resim/yukari.png", false, basma) solon = guiCreateStaticImage(5, 135, 34, 45, "resim/sol.png", false, basma) solarka = guiCreateStaticImage(5, 190, 34, 45, "resim/sol.png", false, basma) bagaj = guiCreateStaticImage(107, 300, 45, 34, "resim/asagi.png", false, basma) sagon = guiCreateStaticImage(220, 135, 34, 45, "resim/sag.png", false, basma) sagarka = guiCreateStaticImage(220, 190, 34, 45, "resim/sag.png", false, basma)-- guiCreateStaticImage(265, 135, 235, 82, "resim/car.png", false, basma) bas = guiCreateStaticImage(325, 230, 45, 34, "resim/asagi.png", false, basma) yukselt = guiCreateStaticImage(390, 230, 45, 34, "resim/yukari.png", false, basma)-- guiCreateStaticImage(575, 60, 150, 250, "resim/car2.png", false, basma) ------------------------------------------------------------------------ peredlevoeP = guiCreateStaticImage(750, 210, 30, 40, "resim/sag.png", false, basma) peredlevoeV = guiCreateStaticImage(710, 210, 30, 40, "resim/sol.png", false, basma) ------------------------------------------------------------------------ peredpravoV = guiCreateStaticImage(525, 210, 30, 40, "resim/sol.png", false, basma) peredpravoP = guiCreateStaticImage(560, 210, 30, 40, "resim/sag.png", false, basma) ------------------------------------------------------------------------ zadlevoeP = guiCreateStaticImage(745, 100, 30, 40, "resim/sag.png", false, basma) zadlevoeV = guiCreateStaticImage(705, 100, 30, 40, "resim/sol.png", false, basma) ------------------------------------------------------------------------ zadpravoeV = guiCreateStaticImage(525, 100, 30, 40, "resim/sol.png", false, basma) zadpravoeP = guiCreateStaticImage(560, 100, 30, 40, "resim/sag.png", false, basma) ------------------------------------------------------------------------endaddEventHandler("onClientResourceStart", resourceRoot, shopInterface)addEventHandler("onClientGUIClick",root,function ( x, y )if source == kaput then triggerServerEvent ("porta1", getLocalPlayer()) elseif source == solon then triggerServerEvent ("porta2", getLocalPlayer()) elseif source == sagon then triggerServerEvent ("porta3", getLocalPlayer()) elseif source == sagarka then triggerServerEvent ("porta4", getLocalPlayer()) elseif source == solarka then triggerServerEvent ("porta5", getLocalPlayer()) elseif source == bagaj then triggerServerEvent ("porta6", getLocalPlayer()) elseif source == yukselt then triggerServerEvent ("subir", getLocalPlayer()) playSound('sesler/bas.mp3') elseif source == bas then triggerServerEvent ("descer", getLocalPlayer()) playSound('sesler/bas.mp3')endend)bindKey( "F4", "down", function() guiSetVisible(basma, not guiGetVisible(basma)) showCursor(guiGetVisible(basma))end)function onGuiClick(button) if button == "left" then if source == bOpenHood then local door = 0 local move_door = 1 triggerServerEvent("moveDoorVeh", getLocalPlayer(), door, move_door) --------------------------------------------------------------------------------------------------- -------------------------------------- Arka Sağ ---------------------------------------------- --------------------------------------------------------------------------------------------------- elseif source == zadpravoeP then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo4 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_rb_dummy") setVehicleComponentPosition(theVeh, "wheel_rb_dummy", x-0.0005, y, z) end end elseif source == zadpravoeV then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo4 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_rb_dummy") setVehicleComponentPosition(theVeh, "wheel_rb_dummy", x+0.0005, y, z) end end --------------------------------------------------------------------------------------------------- -------------------------------------- Arka Sol ---------------------------------------------- --------------------------------------------------------------------------------------------------- elseif source == zadlevoeP then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo4 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_lb_dummy") setVehicleComponentPosition(theVeh, "wheel_lb_dummy", x-0.0005, y, z) end end elseif source == zadlevoeV then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo4 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_lb_dummy") setVehicleComponentPosition(theVeh, "wheel_lb_dummy", x+0.0005, y, z) end end --------------------------------------------------------------------------------------------------- -------------------------------------- ÖN Sağ ---------------------------------------------- --------------------------------------------------------------------------------------------------- elseif source == peredpravoP then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo2 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_rf_dummy") setVehicleComponentPosition(theVeh, "wheel_rf_dummy", x-0.0005, y, z) end end elseif source == peredpravoV then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo2 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_rf_dummy") setVehicleComponentPosition(theVeh, "wheel_rf_dummy", x+0.0005, y, z) end end --------------------------------------------------------------------------------------------------- -------------------------------------- ÖN Sol ---------------------------------------------- --------------------------------------------------------------------------------------------------- elseif source == peredlevoeP then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo1 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_lf_dummy") setVehicleComponentPosition(theVeh, "wheel_lf_dummy", x-0.0005, y, z) end end elseif source == peredlevoeV then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo1 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_lf_dummy") setVehicleComponentPosition(theVeh, "wheel_lf_dummy", x+0.0005, y, z) end end elseif source == bCloseMenu then hideVehGUI() end endend addEventHandler("onClientGUIClick", getRootElement(), onGuiClick)
screenx,screeny = guiGetScreenSize()width, height = 790, 350x, y = (screenx/2-width/2), (screeny/2-height/2) function shopInterface() basma = guiCreateStaticImage(x, y, width, height, "resim/panel1.png", false) guiSetVisible(basma, false)--panel_adi = guiCreateStaticImage(0, 0, width, 25, "resim/panel.png", false, basma) panel_adii = guiCreateLabel(0, -8, width, 25, "Araç Kontrol Paneli", false, panel_adi)guiLabelSetHorizontalAlign(panel_adii, "center")guiLabelSetVerticalAlign(panel_adii, "bottom")guiSetFont(panel_adii, "default-bold-small")guiLabelSetColor(panel_adii, 255, 255, 255)-- guiCreateStaticImage(25, 65, 210, 235, "resim/arrow.png", false, basma) kaput = guiCreateStaticImage(107, 30, 45, 34, "resim/yukari.png", false, basma) solon = guiCreateStaticImage(5, 135, 34, 45, "resim/sol.png", false, basma) solarka = guiCreateStaticImage(5, 190, 34, 45, "resim/sol.png", false, basma) bagaj = guiCreateStaticImage(107, 300, 45, 34, "resim/asagi.png", false, basma) sagon = guiCreateStaticImage(220, 135, 34, 45, "resim/sag.png", false, basma) sagarka = guiCreateStaticImage(220, 190, 34, 45, "resim/sag.png", false, basma)-- guiCreateStaticImage(265, 135, 235, 82, "resim/car.png", false, basma) bas = guiCreateStaticImage(325, 230, 45, 34, "resim/asagi.png", false, basma) yukselt = guiCreateStaticImage(390, 230, 45, 34, "resim/yukari.png", false, basma)-- guiCreateStaticImage(575, 60, 150, 250, "resim/car2.png", false, basma) ------------------------------------------------------------------------ peredlevoeP = guiCreateStaticImage(750, 210, 30, 40, "resim/sag.png", false, basma) peredlevoeV = guiCreateStaticImage(710, 210, 30, 40, "resim/sol.png", false, basma) ------------------------------------------------------------------------ peredpravoV = guiCreateStaticImage(525, 210, 30, 40, "resim/sol.png", false, basma) peredpravoP = guiCreateStaticImage(560, 210, 30, 40, "resim/sag.png", false, basma) ------------------------------------------------------------------------ zadlevoeP = guiCreateStaticImage(745, 100, 30, 40, "resim/sag.png", false, basma) zadlevoeV = guiCreateStaticImage(705, 100, 30, 40, "resim/sol.png", false, basma) ------------------------------------------------------------------------ zadpravoeV = guiCreateStaticImage(525, 100, 30, 40, "resim/sol.png", false, basma) zadpravoeP = guiCreateStaticImage(560, 100, 30, 40, "resim/sag.png", false, basma) ------------------------------------------------------------------------endaddEventHandler("onClientResourceStart", resourceRoot, shopInterface) addEventHandler("onClientGUIClick",root,function ( x, y )if source == kaput then triggerServerEvent ("porta1", getLocalPlayer()) elseif source == solon then triggerServerEvent ("porta2", getLocalPlayer()) elseif source == sagon then triggerServerEvent ("porta3", getLocalPlayer()) elseif source == sagarka then triggerServerEvent ("porta4", getLocalPlayer()) elseif source == solarka then triggerServerEvent ("porta5", getLocalPlayer()) elseif source == bagaj then triggerServerEvent ("porta6", getLocalPlayer()) elseif source == yukselt then triggerServerEvent ("subir", getLocalPlayer()) playSound('sesler/bas.mp3') elseif source == bas then triggerServerEvent ("descer", getLocalPlayer()) playSound('sesler/bas.mp3')endend) bindKey( "F4", "down", function()if getPedOccupiedVehicleSeat(localPlayer) == 0 then guiSetVisible(basma, not guiGetVisible(basma)) showCursor(guiGetVisible(basma))end end) function onGuiClick(button) if button == "left" then if source == bOpenHood then local door = 0 local move_door = 1 triggerServerEvent("moveDoorVeh", getLocalPlayer(), door, move_door) --------------------------------------------------------------------------------------------------- -------------------------------------- Arka Sağ ---------------------------------------------- --------------------------------------------------------------------------------------------------- elseif source == zadpravoeP then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo4 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_rb_dummy") setVehicleComponentPosition(theVeh, "wheel_rb_dummy", x-0.0005, y, z) end end elseif source == zadpravoeV then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo4 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_rb_dummy") setVehicleComponentPosition(theVeh, "wheel_rb_dummy", x+0.0005, y, z) end end --------------------------------------------------------------------------------------------------- -------------------------------------- Arka Sol ---------------------------------------------- --------------------------------------------------------------------------------------------------- elseif source == zadlevoeP then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo4 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_lb_dummy") setVehicleComponentPosition(theVeh, "wheel_lb_dummy", x-0.0005, y, z) end end elseif source == zadlevoeV then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo4 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_lb_dummy") setVehicleComponentPosition(theVeh, "wheel_lb_dummy", x+0.0005, y, z) end end --------------------------------------------------------------------------------------------------- -------------------------------------- ÖN Sağ ---------------------------------------------- --------------------------------------------------------------------------------------------------- elseif source == peredpravoP then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo2 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_rf_dummy") setVehicleComponentPosition(theVeh, "wheel_rf_dummy", x-0.0005, y, z) end end elseif source == peredpravoV then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo2 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_rf_dummy") setVehicleComponentPosition(theVeh, "wheel_rf_dummy", x+0.0005, y, z) end end --------------------------------------------------------------------------------------------------- -------------------------------------- ÖN Sol ---------------------------------------------- --------------------------------------------------------------------------------------------------- elseif source == peredlevoeP then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo1 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_lf_dummy") setVehicleComponentPosition(theVeh, "wheel_lf_dummy", x-0.0005, y, z) end end elseif source == peredlevoeV then local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(theVeh) if (theVeh) then for steklo1 in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, "wheel_lf_dummy") setVehicleComponentPosition(theVeh, "wheel_lf_dummy", x+0.0005, y, z) end end elseif source == bCloseMenu then hideVehGUI() end endend addEventHandler("onClientGUIClick", getRootElement(), onGuiClick)
function panel_ac_kapa()if getPedOccupiedVehicleSeat (getLocalPlayer()) == 0 then return outputChatBox("#cc0000Araç Kontrol Panelini Sadece araç sahibikullanabilir.", 255, 255, 255, true)elseif (guiGetVisible(basma) == false) thenguiSetVisible(basma, true)showCursor(true)elseguiSetVisible(basma, false)showCursor(false)endendbindKey("F5", "down", panel_ac_kapa)