• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Actor weapon
#7
(2021-03-10, 10:38 AM)Radical Wrote: rz = 98.899940;
This is the angle. You have to change it using GetDynamicActorFacingAngle(actorid, rz);

I tried:
Code:
? ? // created [15:21:57] x[-29.020599] y[-186.818206] z[1003.546875] RotX[0] RotY[0] RotZ[0]
? ? // moved [15:23:45] x[-28.945550] y[-186.275421] z[1003.882324] rx[0.000000] ry[-3.300002] rz[98.899940]
? ? // http://www.calculadoraonline.com.br/basica
? ? new Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz;
? ? GetDynamicActorPos(actorid, x, y, z);
? ? x = 1.0;
? ? x -= 0.924951;
? ? y = 0.542785;
? ? z = 0.335449;
? ? rx = 0.0;
? ? ry = 3.300002;
? ? // angle to hands
? ? new Float:tmpRZ;
? ? GetDynamicActorFacingAngle(actorid, tmpRZ); // 1.677500
? ? new Float:base = 100.57744; // 98.899940.677500 = 100.57744
? ? rz = base - tmpRZ; // 98.899940
? ? //
? ? DestroyDynamicObject(ActorInfo[actorid][actorGun]);
? ? ActorInfo[actorid][actorGun] = CreateDynamicObject(GetGunObjectID(24), x, y, z, rx, ry, rz);

It looks better, but its not like the original actor...

Original Actor:
[Image: Tfc0wa7.png]

How it was:
[Image: igOe4f7.png]

How it is now:
[Image: Screenshot-from-2021-03-21-15-44-49.png]
  Reply


Messages In This Thread
Actor weapon - by annety - 2021-03-07, 02:30 PM
RE: Actor weapon - by Virsenas - 2021-03-07, 02:34 PM
RE: Actor weapon - by Y_Less - 2021-03-07, 04:28 PM
RE: Actor weapon - by annety - 2021-03-08, 01:16 AM
RE: Actor weapon - by Y_Less - 2021-03-10, 02:06 AM
RE: Actor weapon - by Radical - 2021-03-10, 10:38 AM
RE: Actor weapon - by annety - 2021-03-21, 06:47 PM
RE: Actor weapon - by annety - 2021-04-20, 06:22 AM
RE: Actor weapon - by AbyssMorgan - 2021-04-20, 02:53 PM
RE: Actor weapon - by annety - 2021-04-21, 07:19 AM
RE: Actor weapon - by annety - 2021-04-26, 08:30 AM
RE: Actor weapon - by AbyssMorgan - 2021-04-27, 03:05 PM

Forum Jump: