NPC help - 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: NPC help (
/showthread.php?tid=399916)
NPC help -
ExpertSahil - 16.12.2012
I want to create a NPC.
I've made recorded path, npc joined the server and he is driving his vehicle as i did while recording.
I've also made a dialog box on player state change, when player enter in NPC's car he get a dialog box.
My question is:
How to stop NPC? { I mean i don't want him to start his recording without getting answer from dialog box }
How I will tell NPC that he have to do which recording?, lIke i have 2 recorded paths and In dialog box he got two optiolns
either cityhall or gym.
If he select cityhall then i want npc to start the path that i made to goto gym and same at other option.
Please help me, reply if you are still confused.
Re: NPC help -
ExpertSahil - 17.12.2012
Its 2nd day, nobody can help me?
Re: NPC help -
AIped - 17.12.2012
heres what i made once, you can put it in your FS or GM;
pawn Код:
forward SendClientMessageToNPC(playerid, color, string[]);
public SendClientMessageToNPC(playerid, color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerNPC(i))
{
SendClientMessage(i, color, string);
}
}
}
just on the dialogresponse button do SendClientMessageToNPC(playerid, color, "some message here");
then on the npc-script OnClientMessage will respond on "some message here" try it out
Re: NPC help -
ExpertSahil - 17.12.2012
Hmm intresting, i will try it out, thanks for replying... REP+