27.06.2014, 23:53
How to detect an obstruction encountered by a moving object? vehicles with players or static GTA objects?
new OBJ = CreateObject..............
new Float:x, Float:y, Float:z;
new Float:px, Float:py, Float:pz;
GetObjectPos(OBJ, x, y, z);
GetPlayerPos(playerid, px, py, pz);
if( x == px && y == py)
{
//add what u want to do here..
//I suggest u stop it soo...
MoveObject(OBJ, px+5, py+5, pz, 30.0); //+5 depending on object size
return 1;
}
and what about static GTA objects?
and timer 20ms :/ i need study this xd and maybe other ideas?