SetPlayerAttachedObject
#1

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
Reply
#2

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.
Reply
#3

for example how can i put hat on the head ?
Reply
#4

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

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
Reply
#6

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

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.. ?
Reply
#8

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

or

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


Forum Jump:


Users browsing this thread: 1 Guest(s)