SA-MP Forums Archive
Object in characters 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: Object in characters hand (/showthread.php?tid=538284)



Object in characters hand - Jigsaw123 - 20.09.2014

How do I do it so that when someone presses CTRL at 0,0,0 - They get the crouching anim and then something appears in their hand? Object ID 1 for example.

thanks!


Re: Object in characters hand - Blt950 - 21.09.2014

With 0,0,0 you mean at the position 0,0,0? Well, for that it's just to use the GetPlayerPos().
To make them crouch use SetPlayerSpecialAction().
To appear some object in their hand you can use the SetPlayerAttachedObject()

Combine them all together and you should get your wished result.
Links to the wiki for the functions:

https://sampwiki.blast.hk/wiki/GetPlayerPos
https://sampwiki.blast.hk/wiki/SetPlayerSpecialAction
https://sampwiki.blast.hk/wiki/SetPlayerAttachedObject