SA-MP Forums Archive
How to attach a cigarette to player's hand? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to attach a cigarette to player's hand? (/showthread.php?tid=461526)



How to attach a cigarette to player's hand? - KurtAngle - 02.09.2013

Hi
In "OnPlayerRequestClass" i've put this animations:
Код:
ApplyAnimation(playerid,"SHOP", "Smoke_RYD", 4.1, 1, 0, 0, 0, 0);
The animation works perfectly but now I would like to attach a cigarette on the player's hand.
It's possible make this? If yes, how i can do it?


Re: How to attach a cigarette to player's hand? - TonyII - 02.09.2013

With AttachObjectToPlayer,
https://sampwiki.blast.hk/wiki/AttachObjectToPlayer
I assume there is a cigarrete object.


Re: How to attach a cigarette to player's hand? - Emmet_ - 02.09.2013

pawn Код:
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);



Re: How to attach a cigarette to player's hand? - KurtAngle - 02.09.2013

Mmh... it semi-work... The cigarette was attached succesfully but the anim now not play... anyway i prefer this. thanks for the help Emmet!


Re: How to attach a cigarette to player's hand? - GGW - 06.09.2013

here my friend

Quote:

if (strcmp("/ciggy", cmdtext, true, 10) == 0||strcmp("/CIGGY", cmdtext, true, 10) == 0)
{
ApplyAnimation(playerid, "SHOP", "Smoke_RYD", 4.1, 1, 0, 0, 0, 0);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);

return 1;
}