attached object
#1

is there a way to get positions xyz of attached object to player or vehicle? getobjectpos dont get..
Reply
#2

Are you sure they don't work? Are you using the function in the correct way?
Reply
#3

yes i think can you show example that works
Reply
#4

sorry for doublepost here is test
Quote:

#include <a_samp>

new obj;
new car;

public OnGameModeInit()
{
car = CreateVehicle(405, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 60);
obj = CreateObject(2587, 0.0, 0.0, 0.0, 0.0, 0.0, 96.0);
SetTimer("update",1000,true);
return 1;
}

forward update();
public update()
{
new Float:x;
new Float:y;
new Float:z;
AttachObjectToVehicle(obj, car, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
GetObjectPos(obj, x, y, z);
printf("x:%f y:%f z%f",x,y,z);
return 1;
}

i get this

Quote:

[01:25:25] x:0.000000 y:0.000000 z0.000000
[01:25:26] x:0.000000 y:0.000000 z0.000000
[01:25:27] x:0.000000 y:0.000000 z0.000000
[01:25:28] x:0.000000 y:0.000000 z0.000000
[01:25:29] x:0.000000 y:0.000000 z0.000000

Reply
#5

bump
Reply
#6

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)