Jump to content

AngelAlpha

Members
  • Posts

    190
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by AngelAlpha

  1. Ты же тут не меняешь ротацию, она у тебя постоянно 0
  2. AngelAlpha

    Car

    No. If vehicle 4-door DFF replace on 2-door vehicle, then only 2 players can seat
  3. elements.main_profile = dgsCreateScrollPane (0, 80*px, sx, sy - 80*px, false) ........... local gradient = dgsCreateGradient (tocolor(255, 107, 0), tocolor(255, 240, 0), 90 - 12) local gradient2 = dgsCreateGradient (Config.colors[1], Config.colors[1], 0) elements.tabPanel_profile = dgsCreateTabPanel (100*px, 650*px, 1140*px, 332*px, false, elements.main_profile, 60*px, _, tocolor(50, 50, 50, 0)) elements.tabPanel_profile_main = dgsCreateTab("Основная статистика", elements.tabPanel_profile) elements.tabPanel_profile_finance = dgsCreateTab("Имущество", elements.tabPanel_profile) elements.tabPanel_profile_job = dgsCreateTab("Занятость", elements.tabPanel_profile) dgsSetProperty(elements.tabPanel_profile,"tabImage",{gradient2,gradient2,gradient}) dgsSetProperty(elements.tabPanel_profile,"tabPadding",{15*px, false}) dgsSetProperty(elements.tabPanel_profile_main,"textColor",{tocolor(255, 255, 255), tocolor(150, 150, 150), tocolor(0, 0, 0)}) dgsSetProperty(elements.tabPanel_profile_finance,"textColor",{tocolor(255, 255, 255), tocolor(150, 150, 150), tocolor(0, 0, 0)}) dgsSetProperty(elements.tabPanel_profile_job,"textColor",{tocolor(255, 255, 255), tocolor(150, 150, 150), tocolor(0, 0, 0)}) @thisdp and i find a few mistakes mask.lua > 16 line if not(masks[texture2]) then error(dgsGenAsrt(texture2,"dgsCreateMask",2,"texture",_,_"unsupported type")) end > if not(masks[texture2]) then error(dgsGenAsrt(texture2,"dgsCreateMask",2,"texture",_,_,"unsupported type")) end mask.lua > line 69-81 function dgsMaskCenterTexturePosition(dgsMask,w,h) if not(dgsGetPluginType(mask) == "dgs-dxmask") then error(dgsGenAsrt(mask,"dgsMaskCenterTexturePosition",1,"dgs-dxmask")) end local ratio = w/h local scaleW,scaleH = (ratio>1 and ratio or 1),(1/ratio>1 and 1/ratio or 1) dgsMaskSetSetting(dgsMask,"offset",{scaleW/2-0.5,scaleH/2-0.5,1}) end function dgsMaskAdaptTextureSize(dgsMask,w,h) if not(dgsGetPluginType(mask) == "dgs-dxmask") then error(dgsGenAsrt(mask,"dgsMaskAdaptTextureSize",1,"dgs-dxmask")) end local ratio = w/h local scaleW,scaleH = (ratio>1 and ratio or 1),(1/ratio>1 and 1/ratio or 1) dgsMaskSetSetting(dgsMask,"scale",{scaleW,scaleH,1}) end >>> function dgsMaskCenterTexturePosition(mask,w,h) if not(dgsGetPluginType(mask) == "dgs-dxmask") then error(dgsGenAsrt(mask,"dgsMaskCenterTexturePosition",1,"dgs-dxmask")) end local ratio = w/h local scaleW,scaleH = (ratio>1 and ratio or 1),(1/ratio>1 and 1/ratio or 1) dgsMaskSetSetting(mask,"offset",{scaleW/2-0.5,scaleH/2-0.5,1}) end function dgsMaskAdaptTextureSize(mask,w,h) if not(dgsGetPluginType(mask) == "dgs-dxmask") then error(dgsGenAsrt(mask,"dgsMaskAdaptTextureSize",1,"dgs-dxmask")) end local ratio = w/h local scaleW,scaleH = (ratio>1 and ratio or 1),(1/ratio>1 and 1/ratio or 1) dgsMaskSetSetting(mask,"scale",{scaleW,scaleH,1}) end
  4. @thisdp bug with tabPanel. When create tabpanel with attach to parent, Y pos tab wrong. Pos cursor when tab activated Pos cursor on tab Tab panel attached to scrollpane
  5. change ipairs to pairs in function clickInv
  6. Use setVehicleComponentVisible
  7. click on middle mouse button)
  8. Use attachElements and then setElementAttachedOffsets with render event
  9. addCommandHandler("gramode", function () graMode = not graMode if graMode then outputChatBox("graMode is true", 255, 255, 255, true) else outputChatBox("graMode is false", 255, 255, 255, true) end end ) for example
  10. addEventHandler ("onClientClick", root, function(btn, state) if btn ~= "left" or state ~= "down" then return end if isMouseInPosition (xx*594, yy*396, xx*235, yy*300) then -- click 1-st button elseif isMouseInPosition (xx*840, yy*396, xx*235, yy*300) then -- click 2-nd button end end) function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) ) end isMouseInPosition wiki function
  11. addEvent('onPlayerRequestSpawnV', true) addEventHandler('onPlayerRequestSpawnV', root, function(vid) local x,y,z = getElementPosition(source); local _,_,r = getElementRotation(source); local spawnedV = getElementData(source, 'conce.garagem.spawneds') or {}; for i,v in ipairs(spawnedV) do if v.vidC == vid then if v.vh and isElement(v.vh) then destroyElement(v.vh) return false; end end end vehicleSV = createVehicle(vid, x,y,z,_,_,r) warpPedIntoVehicle(source, vehicleSV) table.insert(spawnedV, {vidC = vid, vh = vehicleSV}) end);
  12. setAccountData(getPlayerAccount(pl), "save:lastpos", toJSON({x, y, z}))
  13. function save (pl) local x, y, z = getElementPosition(pl) setAccountData(getPlayerAccount(pl), "save:lastpos", toJSON(x, y, z)) end function load (pl) local pos = getAccountData(getPlayerAccount(pl), "save:lastpos") if not pos then return end setElementPosition (pl, fromJSON(pos)) end addEventHandler ("onPlayerLogin", root, function() load (source) end) addEventHandler ("onPlayerQuit", root, function () save (source) end) addEventHandler ("onResourceStop", resourceRoot, function() for i, v in ipairs (getElementsByType("player")) do save(v) end end)
  14. Посмотри, может в дебаге ошибки (/debugscript 3) И я посмотрел, там нужен ресурс custom_coronas
  15. if getPedWeapon(source, 1) == 24 and getPedAmmoInClip (source, 1) ~= 0 then Тry this
  16. try this local sX, sY = guiGetScreenSize ( ) local onEmoji4 = {}; local plyEmoji4 = getElementsByType ( "player" ) local showEmoji4 = false function onEmoji4Render ( ) local cx, cy, cz = getCameraMatrix () for p in pairs (onEmoji4) do if ( isElement(p) ) then local x, y, z = getPedBonePosition.. --- -- blag blah blah local dEmoji4 = getDistanceBetweenPoints3D ( cx... -- blag blah blah if ( dEmoji4 < 100 ) then if ( isLineOfSightClear ( cx, cy... -- blag blah blah if (getElementData (p, "Emoji4") == true) then local sx, sy = getScreenFromWorldPosition...-- blag blah blah if ( sx ) and ( sy ) then local sEmoji4 = 400 / ...-- blag blah blah dxDrawImage ( sx - ( sEmoji4 / 2 ), sy - ( sEmoji4 / 2 ), sEmoji4, sEmoji4, "T_UI_Message_Icon_Aisatsu_BC.webp", 0, 0, 0, tocolor ( 255, 255, 255, 255 ) ) end end end end end end end function attachEmoji4 ( Emoji4 ) if not Emoji4 or not isElement ( Emoji4 ) then return end onEmoji4[Emoji4] = true addEventHandler ( "onClientRender", root, onEmoji4Render ) setTimer(function() removeEventHandler ( "onClientRender", root, onEmoji4Render ) end, 2000, 1) end addEvent( "StartEmoji", true ) addEventHandler( "StartEmoji", root, attachEmoji4 )
  17. setElementData(vehicle, "vehicle:upgrades", { turbo = true })
  18. попробуй поставить двухсторонние полигоны Картинка перейди в режим полигонов, выдели весь кузов и поставь ему двухсторонние полигоны
  19. -- Client local theButton = guiCreateButton(100, 200, 80, 40, "Toggle Engine On/Off", false) function handleButton (button,state) if ( button == "left" and state == "up" ) then if ( source == theButton ) then triggerServerEvent("toggleEngine", resourceRoot ) outputDebugString ( tostring ( source ) .. " clicked." ) end end end addEventHandler("onClientGUIClick", theButton, handleButton) -- Server function switchEngine () local theVehicle = getPedOccupiedVehicle ( client ) if theVehicle and getVehicleController ( theVehicle ) == client then local state = getVehicleEngineState ( theVehicle ) setVehicleEngineState ( theVehicle, not state ) end end addEvent("toggleEngine", true) addEventHandler ("toggleEngine", resourceRoot, switchEngine) addCommandHandler ("engine", switchEngine )
  20. setTimer(function() print ("1") end, 7000, 1)
  21. Покажи, о каком мерцании идет речь
×
×
  • Create New...