[Ajuda] NPC, Alguem? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] NPC, Alguem? (
/showthread.php?tid=532577)
NPC, Alguem? -
eNtinityGaming - 19.08.2014
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 '-'
Re: NPC, Alguem? -
SkullFire - 19.08.2014
3° topico com o mesmo assunto .E esse seu loop , estб errado .
Re: NPC, Alguem? -
iAbsolut - 19.08.2014
depois й banido e nгo sabe o motivo... :@
Respuesta: NPC, Alguem? -
Sn0wk - 19.08.2014
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;
}