View Full Version : [Help]Attaching an object to a player.

07/10/2011, 11:02 AM
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 ?

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);
return 1;

07/10/2011, 12:44 PM
Use SetPlayerAtachedObject, is totally synced.

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