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.