Jump to content

Question

Posted

Imi puteti da va rog frumos un script in pawno pentru ca npc-ul sa te urmeze?Am gasit ceva dar nu cred ca e bun:

public OnPlayerText(playerid, text[])

{

    new JackID = GetPlayerID("Jack");

    new Float:x,Float:y,Float:z;

    GetPlayerPos(JackID,x,y,z);

    if(IsPlayerFacingPlayer(playerid,JackID,10.0))

    {

        if(strfind(text, "Follow me") != -1 && IsPlayerInRangeOfPoint(playerid,5.0,x,y,z))

        {

            SetPlayerChatBubble(JackID,"Ok!",white, 100.0, 5000);

            SetTimerEx("GetJackToFolow",100,1,"i",playerid);

            ApplyAnimation(JackID,"PED","WALK_PLAYER",4.1,1,1,1,1,0);

            return 1;

        }

    }

    return 1;

}

forward GetJackToFolow(playerid);

public GetJackToFolow(playerid)

{

    new JackID = GetPlayerID("Jack");

    SetPlayerFacingPlayer(JackID, playerid);

}

4 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.