AttachObjectToPlayer
#1

Hello everyone! I want to make a object attached to my characters face, but whats the "coordinates" of the face, lol.. How can I place it right?

Код:
 		if(strcmp(cmdtext, "/skull", true) == 0)
		{
		    AttachObjectToPlayer(skullface, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
		    return 1;
		}
I took that from the wiki.samp, but I don't think it will attach on the face of my character..
Reply
#2

use SetPlayerAttachedObject; it has a 'boneid' parameter (use the spine/head/whatever).
Reply
#3

I tried 2 minutes ago, but nothing happened ;o Anyways, when I actually tried this one, the skull (objectid) was attached to me, 1 metre away or something. if I just could somehow move it? I'll try the SetPlayerAttachedObject thing again.
Reply
#4

Nothing happends..

Код:
 		if(strcmp(cmdtext, "/skull", true) == 0)
		{
		    SetPlayerAttachedObject(playerid, 0, skullface, 2);
		    return 1;
		}
Any suggestions? I'll keep on trying meanwhile


[EDIT]: BTW, what does Index Slot means? I'm not very good at speaking english nor the grammar etc. , soo..
Reply
#5

[ame]http://www.youtube.com/watch?v=mqV6UoFomds[/ame]

Here's what happens when I have this code ;
Код:
		if(strcmp(cmdtext, "/skull", true) == 0)
		{
		    SetPlayerAttachedObject(playerid, 3, 1254, 2);
		    SetPlayerAttachedObject(playerid, 2, skullface, 2, 0.101, -0.0, 0.0, 0.0, 84.60, 83.7, 1, 1, 1);
		    return 1;
		}
Reply
#6

For your Post Which says the index slot:

It it the slot you will use for the object (maximum is 6)

And to attach it to his head:

pawn Код:
SetPlayerAttachedObject(playerid, 3, 1254, 2);
(3 is the slot, 1254 is the ID of the object, 2 is the head)

This code should work, if it goes far away, put this code only in the command:

pawn Код:
SetPlayerAttachedObject(playerid, 2, skullface, 2, 0.101, -0.0, 0.0, 0.0, 84.60, 83.7, 1, 1, 1);
Reply
#7

I've tried both of them by themselves in the scipt. It didn't work out.. :/
Reply
#8

It disappears like in the video or?
Reply
#9

I Had the same problem as you Kudoz - Anyway to fix ?
Reply
#10

When I use the long line, nothing happens.. when I use the short line, with " 3, skullface, 2 " then it just dissapears.. Can it be something else in the server that affects this? Cuz I had a santa hat before, but now it doesnt work anymore either.. it just dissappears.. what can affect these things?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)