SA-MP Forums Archive
GetDynamicObjectPos - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GetDynamicObjectPos (/showthread.php?tid=562500)



GetDynamicObjectPos - Banditukas - 09.02.2015

Hi,

When i createdynamicobject i can instantly use GetDynamicObjectPos?

Код:
public OnPlayerSpawn( playerid )
{
          new Float:X,Float:Y,Float:Z, Float:A;
          new object = CreateDynamicObject(...);
          GetDynamicObjectPos(object, X, Y, Z );
GetDynamicObjectRot( object, A, A, A );
}



Re: GetDynamicObjectPos - HazardouS - 09.02.2015

Most likely yes, why don't you add some debugging messages to make sure?
pawn Код:
new debugMsg[64];
format(debugMsg, 64, "X: %.1f Y: %.1f Z: %.1f A: %.1f", X, Y, Z, A);
SendClientMessage(playerid, -1, debugMsg);
and see what you get.


Re: GetDynamicObjectPos - Raidensama - 09.02.2015

do:
PHP код:
public OnPlayerSpawn(playerid){
    new 
Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz;
    
your x to create object;
    
your y to create object;
    
your z to create object;
    
rx your rx to create object;
    
ry your ry to create object;
    
rz your rz to create object;
    new 
object CreateDynamicObject(...,x,y,z,rx,ry,rz,...);

and you can use these x,z,y,rx,ry,rz instantly