-
Posts
190 -
Joined
-
Last visited
-
Days Won
5
Everything posted by AngelAlpha
-
Ты же тут не меняешь ротацию, она у тебя постоянно 0
-
No. If vehicle 4-door DFF replace on 2-door vehicle, then only 2 players can seat
- 1 reply
-
- 1
-
-
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
-
@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
-
change ipairs to pairs in function clickInv
-
Use setVehicleComponentVisible
-
click on middle mouse button)
-
engineImportTXD
-
[QUESTION] Attaching moving objects to a vehicle
AngelAlpha replied to NovaCrew's topic in Scripting
Use attachElements and then setElementAttachedOffsets with render event -
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
-
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
-
getGroundPosition
-
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);
-
How I can persist position data? Persist position data! [HELP]
AngelAlpha replied to Murilo_apa's topic in Scripting
setAccountData(getPlayerAccount(pl), "save:lastpos", toJSON({x, y, z})) -
How I can persist position data? Persist position data! [HELP]
AngelAlpha replied to Murilo_apa's topic in Scripting
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) -
Посмотри, может в дебаге ошибки (/debugscript 3) И я посмотрел, там нужен ресурс custom_coronas
-
if getPedWeapon(source, 1) == 24 and getPedAmmoInClip (source, 1) ~= 0 then Тry this
-
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 )
- 6 replies
-
- 1
-
-
- triggerevent
- help
-
(and 1 more)
Tagged with:
-
setElementData(vehicle, "vehicle:upgrades", { turbo = true })
-
попробуй поставить двухсторонние полигоны Картинка перейди в режим полигонов, выдели весь кузов и поставь ему двухсторонние полигоны
-
-- 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 )
-
доступа нет
-
setTimer(function() print ("1") end, 7000, 1)
-
MTA Province. Артефакты интерфейса.
AngelAlpha replied to Zahrumka's topic in Помощь / Отчеты об ошибках
Я думаю, это все таки проблема скрипта -
Покажи, о каком мерцании идет речь