#1

is there something with this codes, i'm trying to Attach the object to the player it doesn't work.


Код:
    SetPlayerAttachedObject(playerid, 0, 2907,0,Position[0],Position[1],Position[2]);
    SetPlayerAttachedObject(playerid, 1, 2905,0,Position[0]+0.85376, Position[1]+0.161621,Position[2]-0.01857662, 0, 26, 278);
    SetPlayerAttachedObject(playerid, 2, 2905,0,Position[0]+0.739746, Position[1]-0.158935,Position[2]+0.006423, 356.68469238281, 145.93511962891, 263.75891113281);
    SetPlayerAttachedObject(playerid, 3, 2906,0,Position[0]-0.081787, Position[1]+0.239991,Position[2]-0.03601265, 359.30590820313, 273.93939208984, 298.02392578125);
    SetPlayerAttachedObject(playerid, 4, 2906,0,Position[0]-0.024414, Position[1]-0.30957,Position[2]-0.03601265, 359.01071166992, 339.99688720703, 242.68936157227);
Reply
#2

because the bone = 0

(playerid, index, modelid, bone, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ, materialcolor1, materialcolor2)

https://sampwiki.blast.hk/wiki/Bone_IDs
Reply
#3

i changed it to 6 still..
Reply
#4

id must be new id = createobject
SetPlayerAttachedObject(playerid, 0,id,
and show your postion table
Reply
#5

it's
Код:
new Float:Position[3];
	GetPlayerPos(playerid,Position[0],Position[1],Position[2]);
it's not working..
Reply
#6

Quote:
Originally Posted by Azula
Посмотреть сообщение
id must be new id = createobject
SetPlayerAttachedObject(playerid, 0,id,
and show your postion table
No it shouldn't you don't have to use createobject.

On Topic:

You dont need to do Position[0]+0.85376 you just need to do 0.85376 instead as they are offset.
So correct code:
PHP код:
SetPlayerAttachedObject(playerid12905,0,0.853760.161621,-0.01857662026278);
//like this remove Postion[0]+ ,Postion[1]+ and Position[2]+ from all lines. 
Reply
#7

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
No it shouldn't you don't have to use createobject.

On Topic:

You dont need to do Position[0]+0.85376 you just need to do 0.85376 instead as they are offset.
So correct code:
PHP код:
SetPlayerAttachedObject(playerid12905,0,0.853760.161621,-0.01857662026278);
//like this remove Postion[0]+ ,Postion[1]+ and Position[2]+ from all lines. 
m8 thanks, but the position f*cked up XD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)