SA-MP Forums Archive
SetPlayerAttachedObject - 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: SetPlayerAttachedObject (/showthread.php?tid=439227)



SetPlayerAttachedObject - nor15 - 24.05.2013

How can i get those things to put attached objects on player

PHP код:
fOffsetX    (optionalX axis offset for the object position.
fOffsetY    (optionalY axis offset for the object position.
fOffsetZ    (optionalZ axis offset for the object position.
fRotX       (optionalX axis rotation of the object.
fRotY       (optionalY axis rotation of the object.
fRotZ       (optionalZ axis rotation of the object.
fScaleX     (optionalX axis scale of the object.
fScaley     (optionalY axis scale of the object.
fScalez     (optionalZ axis scale of the object



Re: SetPlayerAttachedObject - Kirollos - 24.05.2013

fOffsetX,Y,Z are the positions from the player.

like example setting fOffsetZ to 2 (i am not sure about the exact position) can maybe set the object near the player's head. i can't explain it to you but hope you get what i mean.


Re: SetPlayerAttachedObject - nor15 - 24.05.2013

for example how can i put hat on the head ?


Re: SetPlayerAttachedObject - mineralo - 24.05.2013

use editor
https://sampforum.blast.hk/showthread.php?pid=2161926#pid2161926


Re: SetPlayerAttachedObject - Kirollos - 24.05.2013

just make dynamic system with a command so you will know how will X,Y,Z works.

like:

pawn Код:
CMD:cpobject(playerid, params[])
{
    new idx, id, bone, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz;
    if(!sscanf(params, "dddffffff", idx, id, bone, x, y, z, rx, ry, rz))
    {
        SetPlayerAttachedObject(playerid, idx, id, bone, x, y, z, rx, ry, rz); // i didn't bother to make the other paramenters as they were optional aswell.
    }
    else return SendClientMessage(playerid, -1, "USAGE: /cpobject [index] [createdobjectid] [bone] [x] [y] [z] [rx] [ry] [rz]");
    return 1;
}
i tried ig abit some positions till it fit:

/cpobject 0 19487 2 0.15 0 0 0 90 0

which returned for me like this:



hope this helps you


Re: SetPlayerAttachedObject - nor15 - 24.05.2013

Quote:
Originally Posted by mineralo
Посмотреть сообщение
Download Link isn't working


Re: SetPlayerAttachedObject - nor15 - 24.05.2013

Quote:
Originally Posted by kirollos
Посмотреть сообщение
just make dynamic system with a command so you will know how will X,Y,Z works.

like:

pawn Код:
CMD:cpobject(playerid, params[])
{
    new idx, id, bone, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz;
    if(!sscanf(params, "dddffffff", idx, id, bone, x, y, z, rx, ry, rz))
    {
        SetPlayerAttachedObject(playerid, idx, id, bone, x, y, z, rx, ry, rz); // i didn't bother to make the other paramenters as they were optional aswell.
    }
    else return SendClientMessage(playerid, -1, "USAGE: /cpobject [index] [createdobjectid] [bone] [x] [y] [z] [rx] [ry] [rz]");
    return 1;
}
i tried ig abit some positions till it fit:

/cpobject 0 19487 2 0.15 0 0 0 90 0

which returned for me like this:



hope this helps you
How to get the ID's of hats etc.. ?


Re: SetPlayerAttachedObject - Kirollos - 24.05.2013

https://sampwiki.blast.hk/wiki/Samp_objects

or

http://www.k-dst.de/index.php