Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 28/02/23 in all areas

  1. fuel-system/s_gas_station.lua:33: Bad argument @ 'dbQuery' [Expected db-connection at argument 3] Salutare am si eu un sistem de benzinarie custom de mine dar nu i dau de cap aici la db-connection de asta va rog mult sa ma ajutati!
    1 point
  2. Refer to Gimbal Lock of Euler rotation system. To resolve this, use rotation matrix to apply rotation changes, and then convert back to eular angles.
    1 point
  3. You also can do this: Go to the Admin Panel by pressing P. Go to the tab 'Resources'. Go to 'Manage ACL'. Double-click on the "Admin" group. Click on 'Add object...'. Then type 'resource.resourcenamehere'
    1 point
  4. go to your mta directory then open server folder,then open mods folder,then open deathmatch folder and then open file named acl.xml with notepad(or any other editing program) and then find on start of that file something which looks like this "Admin"> "Moderator"> "SuperModerator"> "Admin"> "RPC"> "resource.admin"> "resource.webadmin"> and then when you find it put line for your resource for an example "Admin"> "Moderator"> "SuperModerator"> "Admin"> "RPC"> "resource.admin"> "resource.webadmin"> "resource.yourresourcename"> replace "yourresourcename" with your folder/zip archive name and save it and then start your mta server and it will work when u start the resource.
    1 point
  5. If your MTA crashes on startup or during the game, then first of all you should visit the list of known crash types (link) and search for a match with the crash offset from your crash dialog (example: "Offset = 0x003F0BF7" > copy and search for 0x003F0BF7). Incase your particular crash is listed in the table, the reason for said crash and resolution info is provided on that page, right behind the crash offset. Note: most people will think "oh, nah, probably not relevant to me", but crashes with known reasons that are listed, together make up 85% of all MTA crashes globally, and most support is requested for clarified crashes. So for the sake of getting a faster fix, we recommend really taking this step. If your crash isn't listed, then download and run MTADiag and follow the instructions. If MTADiag will not run for you, download & install Visual C++ 2017 runtimes (using this link, download automatically starts) Then create a topic in this section (Client support) and post any Pastebin URL MTADiag gives you in there. If for some reason MTADiag does not function, do the following before creating a new topic: Install the latest patch of MTA:SA Install the latest DirectX runtime by keeping this option to automatically install it, enabled in the MTA installer selection. If installing those does not fix the problem, try: Delete the gta_sa.set file located in the GTA San Andreas User Files in your Documents folder/library (Windows Vista and 7 users) or My Documents directory (Windows XP users) Check in your GTA San Andreas installation directory for a D3D9.dll. If one is present, delete it. Ensure that your GTA San Andreas installation is not modded in any way. If it is - please uninstall, then reinstall GTA San Andreas first before installing MTA: San Andreas. While MTA can cope well with most mods, this will exclude the chance some funky mod is causing problems without a long troubleshooting process to determine which specific mod the culprit is. Please note that the more (type of) SA mods you have, the higher the risk for stability issues; MTA has a high tolerance for things it's not designed to be compatible with, but it has its limits. We cannot guarantee support if you're using a modded installation while running into problems. Also include any error messages that may appear when your MTA:SA crashes; either copy and paste of the crash log or a screenshot is fine. Thank you! Note: If you want to read more about MTADiag or report issues while using this tool, go here: https://forum.multitheftauto.com/topic/32071-mtadiag-diagnostic-tool-for-mtasa/
    1 point
  6. I have this code: sx, sy = guiGetScreenSize() movedClip = false testAngle = 0 function math.rotVecToEular(x, y, z, rot) -- explained on mta wiki local rotx = math.deg( math.atan2 ( z, (x^2+y^2)^0.5 ) ) % 360 local rotz = math.deg( math.atan2( x, y ) ) % 360 return rotx, rot, rotz end addEventHandler("onClientRender", root, function () local relX, relY = getCursorPosition() local cursorX, cursorY = relX * sx, relY * sy local camX, camY, camZ = getCameraMatrix() local cursorWorldPosX, cursorWorldPosY, cursorWorldPosZ = getWorldFromScreenPosition(cursorX, cursorY, 20) hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ = processLineOfSight(camX, camY, camZ, cursorWorldPosX, cursorWorldPosY, cursorWorldPosZ, true, false, false, true, false, true, false, true) if hit then testAngle = (testAngle + 1) % 360 angleVectorX, angleVectorY, angleVectorZ = math.rotVecToEular(normalX, normalY, normalZ, testAngle) angleVectorX = angleVectorX - 90 -- cone look "up" when testAngle = 0 hitX = normalX*0.2 + hitX -- a bit up from a plane hitY = normalY*0.2 + hitY -- a bit up from a plane hitZ = normalZ*0.2 + hitZ -- a bit up from a plane if isElement(movedClip) then destroyElement(movedClip) end movedClip = createObject(1238, hitX, hitY, hitZ, angleVectorX, angleVectorY, angleVectorZ, true) end end) But i need rotation in other axis, like so: - Need rotation in "Z" axis with ZYX Euler coordinate system. Script doing that in MTA: And in blender "X" axis in XYZ Euler angles: I tried set setElementRotation with 5 argument "ZYX" but it didn't work, like it's swap X and Z angles, not a different coordinate system: local angX = 0 local angY = 0 local angZ = 0 local modelToRotate = false sx, sy = guiGetScreenSize() addEventHandler("onClientRender", root, function () if isCursorShowing() then if getKeyState("4") then angX = (angX + 1) % 360 end if getKeyState("5") then angY = (angY + 1) % 360 end if getKeyState("6") then angZ = (angZ + 1) % 360 end dxDrawText("X:" .. angX .. " Y:" .. angY .. " Z:" .. angZ, 300, 60) local relX, relY = getCursorPosition() local cursorX, cursorY = relX * sx, relY * sy local camX, camY, camZ = getCameraMatrix() local cursorWorldPosX, cursorWorldPosY, cursorWorldPosZ = getWorldFromScreenPosition(cursorX, cursorY, 20) local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ = processLineOfSight(camX, camY, camZ, cursorWorldPosX, cursorWorldPosY, cursorWorldPosZ, true, false, false, true, false, true, false, true) if isElement(modelToRotate) then destroyElement(modelToRotate) end modelToRotate = createObject(1238, hitX, hitY, hitZ, 0, 0, 0, true) setElementRotation(modelToRotate, angX, angY, angZ, "ZYX") end end ) keys 4, 5, 6 for rotation in X, Y, Z axis. How to rotate a object in Z axis, but to a normal vector from processLineOfSight, like in first attached video?
    0 points
  7. Thanks for reporting. In the future please report directly to AC team as the public forums are not designed for player reports.
    0 points
×
×
  • Create New...