SA-MP Forums Archive
press Y to talk with NPC - 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: press Y to talk with NPC (/showthread.php?tid=610057)



press Y to talk with NPC - Thinh - 19.06.2016

DELETE


Re: press Y to talk with NPC - luke49 - 19.06.2016

https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
https://sampwiki.blast.hk/wiki/Keys


Re: press Y to talk with NPC - Thinh - 19.06.2016

Please write me a full code ? I need full code


Re: press Y to talk with NPC - Luis- - 19.06.2016

You're not going to learn anything by asking people to do the work for you..


Re: press Y to talk with NPC - Thinh - 19.06.2016

How to create NPC ? and create in FireScirft or in Gamemode?


Re: press Y to talk with NPC - Thinh - 19.06.2016

Please help me ( Add where ? Gamemode or FS


Re: press Y to talk with NPC - luke49 - 19.06.2016

Instead of NPC, you can also use CreateActor function.
https://sampwiki.blast.hk/wiki/CreateActor


Re: press Y to talk with NPC - Thinh - 19.06.2016

Press Y add in gamemode or FS actor?


Re: press Y to talk with NPC - Thinh - 20.06.2016

Please help mee


Re: press Y to talk with NPC - Maximun - 20.06.2016

PHP код:
//OnGameModeInit :
new OurActor CreateActor(SkinIDPosXPosYPosZfacingangle);
//OnPlayerKeyStateChange :
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if (
PRESSED(KEY_YES))
    {
        new 
Float:PosXACtorFloat:PosYACtorFloat:PosZACtor;
        
GetActorPos(OurActorPosXACtorPosYACtorPosZACtor);
        if(
IsPlayerInRangeOfPoint(playerid2.0PosXACtorPosYACtorPosZACtor))
        {
            
SendClientMessage(playerid, -1"Actor said: Hello!");
        }
    }
    return 
1;