Hello guys.
I've started to make an AC-130 like script, where you can shoot from a plane. So i attached an object to a plane what is driven by an other player and i attached the camera to the object. I made the a code like this for shooting missiles:
Код:
if(PRESSED(KEY_FIRE))
{
new Float:x, Float:y, Float:z, Float:camx, Float:camy, Float:camz;
GetPlayerCameraPos(playerid, x, y, z);
GetPlayerCameraFrontVector(playerid, camx, camy, camz);
gGunshipRocket = CreateObject(345, x, y, z, 0.0, 0.0, 500.0);
//SetObjectFaceCoords3D(gGunshipRocket, camx, camy, camz); // a 3rd party stock for changing the rocket's facing
MoveObject(gGunshipRocket, camx, camy, camz, 50);
}
So my problem is that the rocket is flying to an exact position every time and not where i'm amining at.