AttachObjectToPlayer - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: AttachObjectToPlayer (
/showthread.php?tid=265945)
AttachObjectToPlayer -
BizzyD - 03.07.2011
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
Re: AttachObjectToPlayer -
Lorenc_ - 03.07.2011
I don't see the Slot parameter anywhere, by the way, is this function yours? or the one of the SAMP natives?
Re: AttachObjectToPlayer -
BizzyD - 03.07.2011
I am using this editor:
http://forum.sa-mp.com/showthread.ph...ObjectToPlayer
https://sampwiki.blast.hk/wiki/AttachObjectToPlayer
Re: AttachObjectToPlayer -
Lorenc_ - 03.07.2011
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(...);
Re: AttachObjectToPlayer -
BizzyD - 03.07.2011
I used SetPlayerAttachedObject and it worked fine :P Thanks
Re: AttachObjectToPlayer -
[MG]Dimi - 03.07.2011
AttachObjectToPlayer would work too, you only need to use CreateObject(...) like Lorenc_ said