SetPlayerAttachedObject -
nor15 - 24.05.2013
How can i get those things to put attached objects on player
PHP код:
fOffsetX (optional) X axis offset for the object position.
fOffsetY (optional) Y axis offset for the object position.
fOffsetZ (optional) Z axis offset for the object position.
fRotX (optional) X axis rotation of the object.
fRotY (optional) Y axis rotation of the object.
fRotZ (optional) Z axis rotation of the object.
fScaleX (optional) X axis scale of the object.
fScaley (optional) Y axis scale of the object.
fScalez (optional) Z 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