SA-MP Forums Archive
Help with Npc's D: (CNPC) - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with Npc's D: (CNPC) (/showthread.php?tid=189810)



delete - Lorenc_ - 13.11.2010

Dont worry about it


Re: Help with Npc's D: (CNPC) - Retardedwolf - 13.11.2010

pawn Код:
forward NpcSprint ( );

public OnPlayerSpawn ( playerid )
{
    SetTimer ( "NpcSprint", 100, true );
    return 1;
}

#define for_npcs(%1) for(new %1 = 499;%1 >= 450;%1--)

public NpcSprint ( )
{
    new
        Float:X,
        Float:Y,
        Float:Z;
    foreach(Player, i)
    {
        GetPlayerPos ( i, X, Y, Z );
        for_npcs ( npcid )
        {
            if ( IsPlayerInRangeOfPoint ( npcid, 150.0, X, Y, Z ) )
            {
                NPC_WalkTo ( npcid, X, Y, Z, 0 );
            }
        }
    }
    return 1;
}



Re: Help with Npc's D: (CNPC) - Lorenc_ - 13.11.2010

some reason it still dosent work even with foreach... weird


Re: Help with Npc's D: (CNPC) - Lorenc_ - 13.11.2010

bump


(8char)


Re: Help with Npc's D: (CNPC) - Vince - 13.11.2010

Uhm, NPCs always take the first available slot on the server ..


Re: Help with Npc's D: (CNPC) - Lorenc_ - 13.11.2010

Whats that response ment to mean?


Re: Help with Npc's D: (CNPC) - [L3th4l] - 13.11.2010

Why not use the foreach version but for the Bot

pawn Код:
foreach (Bot, botid)
{
    SetPlayerPos(botid, 0.0, 0.0, 10.0); // Pile all NPCs in the centre of the world
}



Re: Help with Npc's D: (CNPC) - Lorenc_ - 13.11.2010

I dont want it to pile them all to the center of the world. I want them to chase me IG.


Re: Help with Npc's D: (CNPC) - Lorenc_ - 14.11.2010

Bump


*8char*


Re: Help with Npc's D: (CNPC) - rbN. - 14.11.2010

Did you do CreateNPC or ConnectNPC? If you got ConnectNPC, change it to CreateNPC(npcid....) then it works