SA-MP Forums Archive
The Textdraw of invenoty - 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: The Textdraw of invenoty (/showthread.php?tid=639021)



The Textdraw of invenoty - Hiei - 10.08.2017

Hi all
i was created invenoty equipment when player press Y
But i don't know how to Add it and when press Y in-game it show for player
i want it like it
- 1 : It can contain item and weapons
- 2 : When Pickup item, it update in invenoty
sorry for my bad english ( i'm vietnamese )
anyone can help me ?


Re: The Textdraw of invenoty - DuyDang2412 - 10.08.2017

To detect when player press Y, in this public:
Quote:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

You just need to check if the newkeys and KEY_YES are matched, then show the textdraw for player.

To update the inventory every time player clicks textdraw, just need to hide and show textdraw that needs updating.


Re: The Textdraw of invenoty - Hiei - 11.08.2017

Quote:
Originally Posted by DuyDang2412
Посмотреть сообщение
To detect when player press Y, in this public:

You just need to check if the newkeys and KEY_YES are matched, then show the textdraw for player.

To update the inventory every time player clicks textdraw, just need to hide and show textdraw that needs updating.
Wow, i know, thanks
But how to add textdraw to game ? myfriend


Re: The Textdraw of invenoty - DuyDang2412 - 11.08.2017

Use iPleomax's TextDraw Editor or TDEditor, create your textdraw then export it as a .pwn file, then just open it, copy the code and paste it in your public OnPlayerConnect(playerid)