AttachObjectToPlayer
#1

Hello, I got some troubles with AttachObjectToPlayer. I am using a AttachObjectToPlayer Editor.

This is my code:

Код:
AttachObjectToPlayer(18632, playerid,0.06,0.04,0.00,0.0,142.0,2.0);
And it dosent show up anything.

And this is the code from the editor

Код:
0,18632,6,0.06,0.04,0.00,0.0,142.0,2.0,1.00,1.00,1.00
It saves in a text file!

It dosent show up any object, its supposed to be a fishing rod.

Anyone know how to solve?

Regards, Alex
Reply
#2

I don't see the Slot parameter anywhere, by the way, is this function yours? or the one of the SAMP natives?
Reply
#3

I am using this editor:

http://forum.sa-mp.com/showthread.ph...ObjectToPlayer

https://sampwiki.blast.hk/wiki/AttachObjectToPlayer
Reply
#4

That function is perhaps to be used with a variable attached to a Object..

Like:
pawn Код:
new object1;

object1 = CreateObject(...);
AttachObjectToPlayer( object1 , playerid, 1.5, 0.5, 0, 0, 1.5, 2 ); // The first parameter is Object ID not the object model ID.
Try do something like this, or you will have to use: SetPlayerAttachedObject(...);
Reply
#5

I used SetPlayerAttachedObject and it worked fine :P Thanks
Reply
#6

AttachObjectToPlayer would work too, you only need to use CreateObject(...) like Lorenc_ said
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)