Resulcan Posted July 11, 2020 Share Posted July 11, 2020 Friends First of all, I made such a Panel In this panel, I want to drive the person's car and increase his speed Server How To Increase The Speed Of The Car When The Person's Button Is Clicked Quickly Boost Your Own Car With Vip Buyers ---------------------------------Client.lua local screenW, screenH = guiGetScreenSize() Wnd = guiCreateWindow((screenW - 389) / 2, (screenH - 310) / 2, 389, 310, "Araba Motor Güçlendirme", false) guiWindowSetSizable(Wnd, false) guiSetVisible(Wnd, false) motorB = guiCreateLabel(29, 21, 61, 15, "1.lvl Motor", false, Wnd) guiSetFont(motorB, "default-bold-small") motori = guiCreateLabel(29, 42, 61, 15, "250 KM/h", false, Wnd) guiSetFont(motori, "default-bold-small") VipM = guiCreateButton(136, 215, 100, 31, "Satın Al", false, Wnd) Kapat = guiCreateButton(136, 267, 100, 31, "Kapat", false, Wnd) ---------------------------------Sever.lua local predefinedHandling = { [411] = { ["engineAcceleration"] = 200, ["dragCoeff"] = 0, ["maxVelocity"] = 200, ["tractionMultiplier"] = 1.5, ["tractionLoss"] = 1.1, }, for i,v in pairs (predefinedHandling) do if i then for handling, value in pairs (v) do if not setModelHandling (i, handling, value) then outputDebugString ("* Önceden Tanımlanmış Kullanım '"..tostring(handling).."' Araç Modeli İçin '"..tostring(i).."' Olarak Ayarlanamadı '"..tostring(value).."'") end end end end for _,v in ipairs (getElementsByType("vehicle")) do if v and predefinedHandling[getElementModel(v)] then for k,vl in pairs (predefinedHandling[getElementModel(v)]) do setVehicleHandling (v, k, vl) end end end function resetHandling() for model in pairs (predefinedHandling) do if model then for k in pairs(getOriginalHandling(model)) do setModelHandling(model, k, nil) end end end for _,v in ipairs (getElementsByType("vehicle")) do if v then local model = getElementModel(v) if predefinedHandling[model] then for k,h in pairs(getOriginalHandling(model)) do setVehicleHandling(v, k, h) end end end end end addEventHandler("onResourceStop", resourceRoot, resetHandling) Link to comment
Hydra Posted July 17, 2020 Share Posted July 17, 2020 (edited) function abc() if (source == "VipM") then triggerServerEvent("yourHandling", localPlayer) end end addEventHandler("onClientGUIClick", getRootElement(), abc) Edited July 17, 2020 by Hydra Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now