FCNPC flying zombies - 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)
+--- Thread: FCNPC flying zombies (
/showthread.php?tid=562870)
FCNPC flying zombies -
SkiT'aZ - 12.02.2015
FIXED.
Re: FCNPC flying zombies -
IndependentGaming - 12.02.2015
try to put this is your gamemode download the include and define it with #define <MapAndreas>
Re: FCNPC flying zombies -
SkiT'aZ - 12.02.2015
I updated my function, but not my zombies aren't moving and attacking me anymore
Код:
function ZMOVE(npcid)
{
new Float:p[3];
new Float:Z;
foreach(Player,i)
{
GetPlayerPos(i,p[0],p[1],p[2]);
GetPointZPos(p[0],p[1],Z);
for(new N = 0; N < MAX_ZOMBIES; N++)
{
FCNPC_GetPosition(ZombieInfo[N][zID], ZombieInfo[N][zX], ZombieInfo[N][zY], ZombieInfo[N][zZ]);
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(Z - 3.0 > ZombieInfo[N][zZ]) FCNPC_Stop(ZombieInfo[N][zID]);
if(IsPlayerInRangeOfPoint(npcid,1,p[0],p[1],p[2]))
{
FCNPC_Punch(npcid,p[0],p[1],p[2],125);
}
}
}
}
return 1;
}
Re: FCNPC flying zombies -
SkiT'aZ - 13.02.2015
Ok, I got It updated like:
Код:
timer UpdateZombieMovement[800]()
{
new Float:zMap, Float:x, Float:y, Float:z, Float:fPos[3];
foreach(Player, i)
{
for(new j = 0; j != MAX_ZOMBIES; j++)
{
FCNPC_GetPosition(j, x, y, z);
zMap = GetPointZPos(x,y);
Zombie[j][ZombieAttackPlayer] = GetNearest_Player(i, 3.0);
if(IsPlayerInRangeOfPoint(i, 40.0, x, y, z))
{
GetPlayerPos(i, fPos[0], fPos[1], fPos[2]);
FCNPC_GoTo(j, fPos[0], fPos[1], fPos[2], MOVE_TYPE_RUN, 5.6, 1);
Zombie[j][IsFollowing] = 1;
if(GetDistanceBetweenPlayers(i,j) < 1.7)
{
if(!FCNPC_IsDead(j))
{
FCNPC_Punch(j,fPos[0], fPos[1], fPos[2],125);
}
}
}
if(zMap > z) FCNPC_SetPosition(j,x,y,zMap);
}
}
return 1;
}
But they still fly :/