SA-MP Forums Archive
Is it me or bug ? - 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: Is it me or bug ? (/showthread.php?tid=342273)



Is it me or bug ? - Azazelo - 13.05.2012

When i CreateObject exp. box then attach it to player my camera act very weird?
I try to reset camera SetCameraBehindPlayer() and camera still showing player model neck.

Why ?


Код:
stock setbackpack(playerid)
{
        new Float:X, Float:Y, Float:Z;
        new myobject;
        GetPlayerPos(playerid, X, Y, Z);
        myobject = CreateObject(1550, X, Y, Z+0.5, 0.0, 0.0, 0.0, 300.0);
        SetObjectMaterial(myobject, 0, 1559, "null", "null", 0x42005100);
        AttachObjectToPlayer(myobject, playerid, 0.30, -0.25, 0.25, 0.0, 0.0, 2.5);

}



Re: Is it me or bug ? - rscaerzx - 13.05.2012

no, it's not a bug,

try this

Код:
stock setbackpack(playerid)
{
    new myobject;
    myobject = SetPlayerAttachedObject(playerid,0,1550,1, 0.021072, -0.150887, -0.019364, 1.896152, 88.398200, 0.000000, 0.924806, 1.000000, 1.000000 );
    SetObjectMaterial(myobject, 0, 1559, "null", "null", 0x42005100);
}



Re: Is it me or bug ? - Azazelo - 13.05.2012

Ok this do part of attaching object to player without "camera weird act" but also make SetObjectMaterial useless to do any thing to object crated this way.