Jump to content

DeiwnEdits

Members
  • Posts

    15
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

DeiwnEdits's Achievements

Square

Square (6/54)

0

Reputation

  1. @#BrosS I changed but same error so error not changed
  2. @#BrosS jump.lua:4 unexpected symbol near '
  3. @DNL291What I am will do? please detail.
  4. Hi guys , I ask question. What's false? function initBind() bindKey("lshift", "down", jumpKey) end addEventHandler("onClientResourceStart", resourceRoot, initBind) function jumpKey() if not isPedInVehicle(localPlayer) then return end local vehicle = getPedOccupiedVehicle(localPlayer) local accName = getAccountName ( getPlayerAccount ( player ) ) if vehicle and getVehicleController(vehicle) == localPlayer and isObjectInACLGroup("user."..accName, aclGetGroup ( "Admin" )) then local vehType = getVehicleType(vehicle) if vehType == "Plane" or vehType == "Helicopter" then return end local sx, sy, sz = getElementVelocity(vehicle) setElementVelocity(vehicle, sx, sy, sz + 0.33) end end Meta.xml <meta> <info type="script" version="1.0.2" name="Jump with vehicles" author="Dutchman101"/> <script src="jump.lua" type="client" cache="false"/> </meta>
  5. --Client Side function setWheels( comboBox ) if ( comboBox == combo1 ) then veh = getPedOccupiedVehicle(localPlayer) if not veh then return end local item = guiComboBoxGetSelected ( comboBox ) local text = tonumber(guiComboBoxGetItemText ( comboBox , item )) addVehicleUpgrade(veh, text) triggerServerEvent ( "onRestartWheels") end end addEventHandler ( "onClientGUIComboBoxAccepted", guiRoot, setWheels) --Server Side function restartHandler () restartResource(getThisResource()) end addEvent( "onRestartWheels", true ) addEventHandler( "onRestartWheels", resourceRoot, restartHandler ) What's false? @majqq
  6. Hi guys I will ask question. I want if I am select gui combobox, do (client) functions and restart resource. But "restartResource" it is server function. How can I do? Please help me!! --Maybe you need --local wheelsModels = {0, 1025, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1096, 1097} -- --combo1 = guiCreateComboBox(0,0.1,1,0.3,"Wheels",true, tuning.window) --for i,wheel in pairs(wheelsModels) do -- guiComboBoxAddItem(combo1, wheel) --end function setWheels( comboBox ) if ( comboBox == combo1 ) then veh = getPedOccupiedVehicle(localPlayer) if not veh then return end local item = guiComboBoxGetSelected ( comboBox ) local text = tonumber(guiComboBoxGetItemText ( comboBox , item )) addVehicleUpgrade(veh, text) restartResource(getThisResource()) end end addEventHandler ( "onClientGUIComboBoxAccepted", guiRoot, setWheels)
  7. Hi Guys, I ask question. I have car color change script but I convert headlights color change script How ? I giving code. ------------------------------------------------------------------------------------------------------------------------------------ addEventHandler("onClientClick", root, function(b, s) if gui.window.visible == true then if b == "left" and s == "down" then x, y = guiGetPosition(gui.window, false) if cursorPosition(x + 16, y + 32, 256, 256) then BLANK_1_STATE = true end if cursorPosition(x + 288, y + 32, 32, 256) then BLANK_2_STATE = true end elseif b == "left" and s == "up" then x, y = guiGetPosition(gui.window, false) if cursorPosition(x + 16, y + 32, 256, 256) then BLANK_1_STATE = false else BLANK_1_STATE = false BLANK_2_STATE = false end if cursorPosition(x + 288, y + 32, 32, 256) then BLANK_2_STATE = false else BLANK_1_STATE = false BLANK_2_STATE = false end end end end) ------------------------------------------------------------------------------------------------------------------------------------ addEventHandler("onClientMouseMove", root, function(x, y) if gui.window.visible == true then if gui.tabpanel:getSelectedTab() == gui.tab_Color then y = y - 15 local gx,gy = guiGetPosition(gui.window, false) if BLANK_1_STATE == true then local offsetx, offsety = x - (gx + 16), y - (gy + 32) color.s = offsetx/255 color.v = (255-offsety)/255 if color.s >= 0.98 then color.s = 0.98 end if color.v >= 0.95 then color.v = 0.95 end if color.s <= 0 then color.s = 0 end if color.v <= 0 then color.v = 0 end end if BLANK_2_STATE == true then local offset = y - (gy + 32) color.h = (256-offset)/256 if color.h >= 0.98 then color.h = 0.98 end if color.h <= 0 then color.h = 0 end color.huecurrent = tocolor(hsv2rgb(color.h, 1, 1)) end if not localPlayer.vehicle then return end if gui.checkbox["Headlights"]:getSelected() then color.r, color.g, color.b = hsv2rgb(color.h, color.s, color.v) triggerServerEvent("server.Color", localPlayer, localPlayer, "Vehicle", {color.r, color.g, color.b, color.rr, color.rg, color.rb}) end if gui.checkbox["Headlights"]:getSelected() then triggerServerEvent("server.Color", localPlayer, localPlayer, "All", {color.r, color.g, color.b, color.rr, color.rg, color.rb}) end end end end) ------------------------------------------------------------------------------------------------------------------------------------ function hsv2rgb(h, s, v) local r, g, b local i = math.floor(h * 5) local f = h * 5 - i local p = v * (1 - s) local q = v * (1 - f * s) local t = v * (1 - (1 - f) * s) local switch = i % 5 if switch == 0 then r = v g = t b = p elseif switch == 1 then r = q g = v b = p elseif switch == 2 then r = p g = v b = t elseif switch == 3 then r = p g = q b = v elseif switch == 4 then r = t g = p b = v elseif switch == 5 then r = v g = p b = q end return math.floor(r*255), math.floor(g*255), math.floor(b*255) end function rgb2hsv(r, g, b) r, g, b = r/255, g/255, b/255 local max, min = math.max(r, g, b), math.min(r, g, b) local h, s local v = max local d = max - min s = max == 0 and 0 or d/max if max == min then h = 0 elseif max == r then h = (g - b) / d + (g < b and 6 or 0) elseif max == g then h = (b - r) / d + 2 elseif max == b then h = (r - g) / d + 4 end h = h/6 return h, s, v end
  8. Hi guys , I have problem I want rotate "steer" object . (Example : İf steering angle 65 , rotate object 650 degree) but has errors; " 'then' expected near '=' " Thanks for help. (and sorry for my bad eng) Function; function steeringwheel() local theVeh = getPedOccupiedVehicle(localPlayer) if getVehicleComponentRotation = handlingGetSteeringLock then local rotX, rotY, rotZ = getElementRotation(theVeh, "steer") setElementRotation(theVeh,"steer"rotX,rotY,rotX*10) end end end addEventHandler("onClientRender", root, steeringwheel)
  9. Hi guys , I have problem I creating checkbox ; steerhelp = guiCreateCheckBox(145,470,100,15,"Steering Assist",true,false,window) Function; function deneme(button) if button == "left" then if source == bOpenHood then local door = 0 local move_door = 1 triggerServerEvent("moveDoorVeh", getLocalPlayer(), door, move_door) ------------------------------------------------------------------------------------------------ if(guiCheckBoxGetSelected(steerhelp))then if(guiCheckBoxSetSelected(steerhelp,true) local steeringHelpEnabled = true else guiCheckBoxSetSelected(steerhelp,false) local steeringHelpEnabled = false end end addEventHandler("onClientGUIClick", getRootElement(), deneme) When I check the checkbox, I want to have "local steeringHelpEnabled = true / false" Please help me , where error? I don't know function.
  10. I need script . I want the script to be automatic close when it's started. I need script because I don't understand mtawiki.com. NOT KEYBİND NOT PANEL
  11. Hi guys , I need script . I need close smoke script but don't need panel or keybind. I want the script to be automatic close when it's started. I need script because I don't understand mtawiki.com.
×
×
  • Create New...