12.01.2011, 18:30
is there a way to get positions xyz of attached object to player or vehicle? getobjectpos dont get..
#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; } |
[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 |