SA-MP Forums Archive
How to make NPCs talk? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: How to make NPCs talk? (/showthread.php?tid=612147)



How to make NPCs talk? - Type-R - 14.07.2016

Hello, well i am interested not really in making my NPCs talk. So i am doing food system in a similar way, like it is in SinglePlayer where you order the food and the NPC shows you what you are about to order. In Singleplayer if i recall correctly the NPC, everytime you get something he says some sort of a phrase. Is it possible to use some of those phrases? Or make the NPC say something, that he could in SinglePlayer? Also, i am using FCNPC.


Re: How to make NPCs talk? - Type-R - 14.07.2016

Sorry, accidentally posted in the wrong section.. Meant to post in scripting help..


Re: How to make NPCs talk? - Iqba - 14.07.2016

You can use SendClientMessage...


Re: How to make NPCs talk? - iKevin - 14.07.2016

He meant the audio. I'm sure you can record it yourself and play the .mp3 file at the function when you want to buy the food.


Re: How to make NPCs talk? - hossa - 14.07.2016

check if the player in range of NPC and run audio.
How hard could it be ? ;_;


Re: How to make NPCs talk? - Ari - 14.07.2016

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

--
https://sampwiki.blast.hk/wiki/PlayerPlaySound (http://pastebin.com/A1PbQZPd)

https://sampwiki.blast.hk/wiki/SendClientMessage


Re: How to make NPCs talk? - Stones - 14.07.2016

I suggest using FNPC and not FCNPC.