
Rat32
Members-
Posts
121 -
Joined
-
Last visited
Everything posted by Rat32
-
Hello. Bug with descync trailers is on roadmap, but in MTA 1.6. Some truck servers needs this fix earlier, so i have suggestion: Bring this bugfix from 1.6 version to 1.6.4. Regards
-
I will create deck gun that will can move this with arrows. moveObject is not good, because I don't know time argument. Any suggestions?
-
Hello. triggerServerEvent per frame is good way to move object serverside smoothly? I have no idea more.
-
Hello. DxDrawText function have other arguments than dxDrawImage or dxDrawRectangle. In text, X and Y is left top corner of the dx. I have to math this to X and Y and width and height like rectangle or image.
-
Hello. I trying to find this animation to use it in setPedAnimation. I need block and name.
-
It works, but returning... -2.2737367544323e-13 0 0 Offset is bad.
-
Okay, working, but how to get a ped bone (head) matrix using getElementMatrix?
-
I changed element:getMatrix() to getElementMatrix(). I have error in line 9. ERROR: 9: attempt to perform arithmetic on field "?" (a nil value) function getOffsetFromXYZ( mat, vec ) -- make sure our matrix is setup correctly 'cos MTA used to set all of these to 1. mat[1][4] = 0 mat[2][4] = 0 mat[3][4] = 0 mat[4][4] = 1 mat = matrix.invert( mat ) local offX = vec[1] * mat[1][1] + vec[2] * mat[2][1] + vec[3] * mat[3][1] + mat[4][1] local offY = vec[1] * mat[1][2] + vec[2] * mat[2][2] + vec[3] * mat[3][2] + mat[4][2] local offZ = vec[1] * mat[1][3] + vec[2] * mat[2][3] + vec[3] * mat[3][3] + mat[4][3] return {offX, offY, offZ} end addCommandHandler("ad",function() hx, hy, hz = getPedBonePosition(localPlayer, 8) playerMatrix = localPlayer:getMatrix() newPlayerMatrix = Matrix(Vector3(hx, hy, hz), playerMatrix.rotation) local matrix = localPlayer.matrix outputChatBox(tostring(matrix[1])) local offset = getOffsetFromXYZ(getElementMatrix(localPlayer), Vector3(getElementPosition(getPedOccupiedVehicle(localPlayer)))) outputChatBox(tostring(offset.x)) end)
-
Hello! I have this code. function getOffsetFromXYZ( mat, vec ) -- make sure our matrix is setup correctly 'cos MTA used to set all of these to 1. mat[1][4] = 0 mat[2][4] = 0 mat[3][4] = 0 mat[4][4] = 1 mat = matrix.invert( mat ) local offX = vec[1] * mat[1][1] + vec[2] * mat[2][1] + vec[3] * mat[3][1] + mat[4][1] local offY = vec[1] * mat[1][2] + vec[2] * mat[2][2] + vec[3] * mat[3][2] + mat[4][2] local offZ = vec[1] * mat[1][3] + vec[2] * mat[2][3] + vec[3] * mat[3][3] + mat[4][3] return {offX, offY, offZ} end addCommandHandler("ad",function() hx, hy, hz = getPedBonePosition(localPlayer, playerMatrix = localPlayer:getMatrix() newPlayerMatrix = Matrix(Vector3(hx, hy, hz), playerMatrix.rotation) local matrix = localPlayer.matrix outputChatBox(tostring(matrix[1])) local offset = getOffsetFromXYZ(matrix, Vector3(getElementPosition(getPedOccupiedVehicle(localPlayer)))) outputChatBox(tostring(offset.x)) end) But when I type /ad i have error: 3: attempt to index field '?' (a nil value)
-
No. I going to get this point relative to vehicle.
-
Hello community. I nedd to calculate rotation of element to make "looking for" of this. For example: I have a arrow object, and I must set him rotation to the specifed point (for example player). I need calculate X, Y, Z rotation to make a "looking for" of this object. Very thanks.
-
I attached getted camera using getCamera() function to vehicle. I must create mouse camera moving using mouse and i have no idea for rotate this camera to looking this to xyz point. I can't use setCameraTarget, because this detaching camera from vehicle.
-
When I use setCameraTarget my object cam will be detached drom car
-
I using getCamera() to get player camera. I can't use setCameraMatrix, becouse I need atach cam to vehicle. How to math camera rotation to set him rotation to xyz to looking a specifed point?. I will make this camera "looking for".
-
Very thanks.
-
Hey. How to get server-sided timer details on clientside? // trigger not, because i use dxDrawText to draw this details. I need this value updated.
-
Ah, exatly. OK - thank you very much!
-
Is on community ModLoader script - it's working like that.
-
Ok, but how to get all this files without manual checking in script?
-
I know, but is the way to get files inside the folder? I need function like this: table getFilesInFolder(path) - i know, this function is not exist, but i need function like this.
-
Hm, okay okay - this is good, but I have another idea - i will create a automatic read files from folder, without insert him to .xml or table. I will create auto-read a folder in the script and auto replacing all files from there. Is the way to make this?