[Help]Attaching an object to a player.
#1

Hey ,

I've been trying to script a humanbomb CMD .

Once someone/you excute the CMD an object(bomb) appears on the player's chest for a certain ammount of time then it disappears .

This is what i got so far but i'm having a problem with AttachObjectToPlayer , how can i get it to work ?

pawn Code:
new Float:x,Float:y,Float:z,object;
CMD:humanbomb(playerid, o[]);
{
GetPlayerPos(playerid, x, y, z);
object = AttachObjectToPlayer(? ? ???? ? ??  ?? );

//What coords should i use ? and do i have to CreateObject ?

SetTimer("humanbomb1", 3000, 0);
return 1;
}
forward humanbomb1();
public humanbomb1()
{
CreateExplosion(x, y, z, 7, 100);
DestroyObject(object);
return 1;
}
Reply
#2

Use SetPlayerAtachedObject, is totally synced.

With this FS you can get the coords and see the function syntax:

https://sampforum.blast.hk/showthread.php?tid=182317
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)