[Ajuda] NPC, Alguem?
#1

pawn Код:
public ZMOVE(npcid)
{
    for(new ie=0; ie<MAX_PLAYERS; ie++)
    if(Team[ie] == HUMAN)
    {
        new Float:p[3];
        foreach(Player,i)
        {
            GetPlayerPos(i,p[0],p[1],p[2]);
            if(IsPlayerInRangeOfPoint(npcid,50,p[0],p[1],p[2]))
        {
            FCNPC_GoTo(npcid,p[0],p[1],p[2],MOVE_TYPE_RUN,10,1);
            if(IsPlayerInRangeOfPoint(npcid,1,p[0],p[1],p[2]))
        {
            FCNPC_Punch(npcid,p[0],p[1],p[2],125);
        }
      }
    }
  }
    return 1;
}
Olб galera, nesse codigo eu tentei adaptar para o npc seguir somente o time dos humanos, sу que tб seguindo o outro time dos zumbis tambйm, sendo q era sу pra seguir o time HUMAN, oq eu fiz de errado, se й que eu fiz errado '-'
Reply
#2

3° topico com o mesmo assunto .E esse seu loop , estб errado .
Reply
#3

depois й banido e nгo sabe o motivo... :@
Reply
#4

Qual cуdigo de time?

pawn Код:
public ZMOVE(npcid)
{

       
        new Float:p[3];
        foreach(Player,i)
        {
            if(Team[i] != HUMAN) continue;

            GetPlayerPos(i,p[0],p[1],p[2]);
            if(IsPlayerInRangeOfPoint(npcid,50,p[0],p[1],p[2]))
            {
               
                FCNPC_GoTo(npcid,p[0],p[1],p[2],MOVE_TYPE_RUN,10,1);
                if(IsPlayerInRangeOfPoint(npcid,1,p[0],p[1],p[2]))
                {
                   
                    FCNPC_Punch(npcid,p[0],p[1],p[2],125);
                }
            }
        }
        return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)