CreateDynamicObject
#11

Quote:
Originally Posted by Twisted_Insane
Посмотреть сообщение
Alright, here's the next problem;

This command should attach a hat to the player:

pawn Код:
CMD:hat(playerid, params[])
{
    //if(!IsPlayerVip(playerid)) return SendClientMessage(playerid, red, "You need to be a VIP to use this command!");
    new myobject;
    myobject = CreateObject(18964, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
    AttachObjectToPlayer(myobject, playerid, 0.0, 0.0, 0.0, 0.0, 0.0, 0);
    return 1;
}
But, what shall be the co-ordinates for "AttachObjectToPlayer" now so the hat will be on the hat? And from where can I get the body co-ordinates?
You can use https://sampwiki.blast.hk/wiki/GetPlayerPos. I also recommend you to use https://sampwiki.blast.hk/wiki/SetPlayerAttachedObject instead of AttachObjectToPlayer.
Reply


Messages In This Thread
CreateDynamicObject - by Twisted_Insane - 17.05.2012, 21:12
Re: CreateDynamicObject - by ViniBorn - 17.05.2012, 21:16
Re: CreateDynamicObject - by Twisted_Insane - 17.05.2012, 21:18
Re: CreateDynamicObject - by ViniBorn - 17.05.2012, 21:22
Re: CreateDynamicObject - by Twisted_Insane - 17.05.2012, 21:28
Re: CreateDynamicObject - by ViniBorn - 17.05.2012, 21:30
Re: CreateDynamicObject - by ReneG - 17.05.2012, 21:31
Re: CreateDynamicObject - by Twisted_Insane - 17.05.2012, 22:07
Re: CreateDynamicObject - by ViniBorn - 17.05.2012, 22:15
Re: CreateDynamicObject - by MP2 - 17.05.2012, 23:48
Re: CreateDynamicObject - by [KHK]Khalid - 18.05.2012, 05:00
Re: CreateDynamicObject - by MP2 - 18.05.2012, 09:24

Forum Jump:


Users browsing this thread: 1 Guest(s)