Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Two questions [help me]

$
0
0
Create the object and move it to the front and explode when colliding with an object, how would you do that?

Code:

        new Float:fVX, Float:fVY, Float:fVZ;
        missile[playerid] = CreateObject(345,fVX,fVY,fVZ, 0.0, 0.0, 0.0);
        MoveObject(missile[playerid],fVX,fVY+10,fVZ, 10.00);


That the object is believed in the position of the camera and moves in direction to where the camera points, how would that be?

Code:

        new Float:fPX, Float:fPY, Float:fPZ;
        new Float:fVX, Float:fVY, Float:fVZ;
        GetPlayerCameraPos(playerid, fPX, fPY, fPZ);
        GetPlayerCameraFrontVector(playerid, fVX, fVY, fVZ);
        new Float:fVX, Float:fVY, Float:fVZ;
        missile[playerid] = CreateObject(345,fVX,fVY,fVZ, 0.0, 0.0, 0.0);
        MoveObject(missile[playerid],fVX,fVY+10,fVZ, 10.00);


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>