NPC help! !! REP+++ -
MasonSFW - 04.10.2014
Hello i using FCNPC plugin i have this problem
NPCs is floating to players how i can fix it?
My code
pawn Код:
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_SPRINT, 10, 1);
if(IsPlayerInRangeOfPoint(npcid,1, p[0], p[1], p[2]))
{
FCNPC_Punch(npcid, p[0], p[1], p[2], 125);
}
}
}
Re: NPC help! !! REP+++ -
MasonSFW - 04.10.2014
no people see this post?
Re: NPC help! !! REP+++ -
Dangjai - 04.10.2014
pawn Код:
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_SPRINT, 9, 1);
if(IsPlayerInRangeOfPoint(npcid,1, p[0], p[1], p[2]))
{
FCNPC_Punch(npcid, p[0], p[1], p[2], 124);
}
}
}
Re: NPC help! !! REP+++ -
MasonSFW - 04.10.2014
NOt working
Re: NPC help! !! REP+++ -
ThunderX - 04.10.2014
1 question your server about zombie?
Re: NPC help! !! REP+++ -
MasonSFW - 05.10.2014
Zombies can flying to players when players stand on the building or driving vehicles, So how i can fix it?
Re: NPC help! !! REP+++ -
ThunderX - 05.10.2014
pawn Код:
public NewPos(playerid){ // Make the zombie Run / Sprint
if( Zombies[playerid][LastZombieHealth] > 0.0 ){
new Float:x,Float:y,Float:z;
new Float:ax,Float:ay,Float:az,Float:dif;
GetPlayerPos(Zombies[playerid][ZombieTarget],ax,ay,az);
GetPlayerPos(playerid,x,y,z);
if( az <= (z+3.0) && az >= (z-3.0)){
if(Zombies[playerid][ZombieRunning] == 1){
ApplyAnimation(playerid,"Muscular","MuscleRun",1,1,1,0,0,0);
GetXYInFrontOfPlayer(playerid,x,y,2.0);
}
else if(Zombies[playerid][ZombieRunning] == 2){
ApplyAnimation(playerid,"Muscular","MuscleSprint",1,1,1,0,0,0);
GetXYInFrontOfPlayer(playerid,x,y,2.8);
}
dif = az;
SetPlayerPos(playerid,x,y,dif);
}else{
if(Zombies[playerid][ZombieRunning]) Parar(playerid);
GetPlayerPos(playerid,x,y,z);
SetPlayerPosFindZ(playerid,x,y,z);
}
}
}
i think it will fix this bug because i think you didn't make the zombie Run!!
Re: NPC help! !! REP+++ -
MasonSFW - 05.10.2014
Npcs moving to players fine,
pawn Код:
FCNPC_GoTo(npcid, p[0], p[1], p[2], MOVE_TYPE_SPRINT, 10, 1);
Quote:
Originally Posted by ThunderX
pawn Код:
public NewPos(playerid){ // Make the zombie Run / Sprint if( Zombies[playerid][LastZombieHealth] > 0.0 ){ new Float:x,Float:y,Float:z; new Float:ax,Float:ay,Float:az,Float:dif; GetPlayerPos(Zombies[playerid][ZombieTarget],ax,ay,az); GetPlayerPos(playerid,x,y,z); if( az <= (z+3.0) && az >= (z-3.0)){ if(Zombies[playerid][ZombieRunning] == 1){ ApplyAnimation(playerid,"Muscular","MuscleRun",1,1,1,0,0,0); GetXYInFrontOfPlayer(playerid,x,y,2.0); } else if(Zombies[playerid][ZombieRunning] == 2){ ApplyAnimation(playerid,"Muscular","MuscleSprint",1,1,1,0,0,0); GetXYInFrontOfPlayer(playerid,x,y,2.8); } dif = az; SetPlayerPos(playerid,x,y,dif); }else{ if(Zombies[playerid][ZombieRunning]) Parar(playerid); GetPlayerPos(playerid,x,y,z); SetPlayerPosFindZ(playerid,x,y,z); } } }
i think it will fix this bug because i think you didn't make the zombie Run!!
|
It not code for FCNPC -.-