28.07.2012, 20:58
it should explode when target is near the object (While the object is Moving)
it's under OnPlayerKeyStateChange and i'm using MoveObject
pawn Код:
GetPlayerPos(targetid, tx, ty, tz);
if(IsPlayerInRangeOfPoint(targetid,3.0, x, y, z) && targetid != playerid && IsPlayerInAnyVehicle(targetid))
{
for(new i;i<MAX_PLAYERS;i++)
{
CreateExplosion(tx, ty, tz, 11, 5.0);
DestroyObject(gRocketObj[i]);
}
}
else if(!IsPlayerInRangeOfPoint(targetid,3.0, x, y, z))
{
}
}
}