Jump to content

haron4igg

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by haron4igg

  1. I want to replace crouch animations to let ped move naturally without additional scripting. We saw how original anims working. we even got one orignal animation, loaded it to 3dmax, then exported and replaced. Animation become static after replacement. In game its being played for example when i'm trying to roll left, but user position is not changing, ped just stays on same location. Just tested replacement with original ped arcive. And everything works fine, so it seems like just importing/exporting with KAM's script brokes the animation.
  2. Hi. Im trying to use new API which allows you to replace default animations with custom one. I'm trying to create set of lay-down-shoting/moving animations to replace default: WEAPON_crouch, GunCrouchFwd, GunCrouchBwd, Crouch_Roll_L, Crouch_Roll_R Animation were created via 3dsmax/KAM's script, replacement succed, but when i activate this anim, for example for instead of Crouch_Roll_L anim, new animation doesn't apply position change to ped. so it just rolls on one place. Any ideas what are we doing wrong?)
  3. Hello, Can somebody explain me, how could be that possible: local file = fileOpen("loading.dds") local size = fileGetSize(file) local raw = fileRead(file, size) fileClose(file) local encoded = teaEncode(raw, "0123456789ABCDEF") local dencoded = teaDecode(encoded, "0123456789ABCDEF") outputDebugString("Raw: " .. string.len(raw)) outputDebugString("Encoded: " .. string.len(encoded)) outputDebugString("Decoded: " .. string.len(dencoded)) if dencoded == raw then outputDebugString("Test PASSED") else outputDebugString("Test FAILED") end Result: Client v1.5.4-release-11354 Oh... never-mind. Tea works only with text-data. Not binary. In order to fix this - wrap data in-to Base64 before encoding. And unwrap after decode. local encoded = teaEncode(base64Encode(raw), "0123456789ABCDEF") local dencoded = base64Decode(teaDecode(encoded, "0123456789ABCDEF")) outputDebugString("Raw: " .. string.len(raw)) outputDebugString("Encoded: " .. string.len(encoded)) outputDebugString("Decoded: " .. string.len(dencoded)) if dencoded == raw then outputDebugString("Test PASSED") else outputDebugString("Test FAILED") end
  4. Hi! Is it possible somehow, to setup HTTPS protocol for MTA Built-in server?
  5. Hi guys! Is it possible to put multiple shaders on one texture/object in such way: 1st shader: Replace original texture -> result1 2nd shader: Pick result1 and put its effects -> result2 3rd shader: Pick result2 and so on... Thank you in advance.
  6. Replace function "getBoneMatrix" in file "bone_pos_rot.lua" with this implementation function getBoneMatrix(ped,bone) local x,y,z,tx,ty,tz,fx,fy,fz x,y,z = getPedBonePosition(ped,bone_0[bone]) if bone == 1 then local x6,y6,z6 = getPedBonePosition(ped,6) local x7,y7,z7 = getPedBonePosition(ped,7) tx,ty,tz = (x6+x7)*0.5,(y6+y7)*0.5,(z6+z7)*0.5 elseif bone == 3 then local x21,y21,z21, x31,y31,z31 x21,y21,z21 = getPedBonePosition(ped,21) x31,y31,z31 = getPedBonePosition(ped,31) if math.round(x21, 2) == math.round(x31, 2) and math.round(y21, 2) == math.round(y31, 2) and math.round(z21, 2) == math.round(z31, 2) then x21,y21,z21 = getPedBonePosition(ped,21) local _,_,rZ = getElementRotation(ped) tx,ty,tz = getPointInFrontOfPoint(x21, y21, z21, rZ, 0.0001) else tx,ty,tz = (x21+x31)*0.5,(y21+y31)*0.5,(z21+z31)*0.5 end else tx,ty,tz = getPedBonePosition(ped,bone_t[bone]) end fx,fy,fz = getPedBonePosition(ped,bone_f[bone]) local xx,xy,xz,yx,yy,yz,zx,zy,zz = getMatrixFromPoints(x,y,z,tx,ty,tz,fx,fy,fz) if bone == 1 or bone == 3 then xx,xy,xz,yx,yy,yz = -yx,-yy,-yz,xx,xy,xz end return xx,xy,xz,yx,yy,yz,zx,zy,zz end Also you need this one functions: function getPointInFrontOfPoint(x, y, z, rZ, dist) local offsetRot = math.rad(rZ) local vx = x + dist * math.cos(offsetRot) local vy = y + dist * math.sin(offsetRot) return vx, vy, z end function math.round(number, decimals, method) decimals = decimals or 0 local factor = 10 ^ decimals if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber(("%."..decimals.."f"):format(number)) end end
  7. Hy everybody! I have fased up with a problems caused by using setWeaponProperty() (server) to setup 1st person aiming for m4(whatever). The most critical problem - shooting with aim doesn't synchronized with other players. And the second one is that accuracy property doesn't affect this aim mode. Seems like this is a MTA bugs... but anyway. my be someone can suggest something regarding this topics:) Thanks.
×
×
  • Create New...