Zombies climbing over poles.
#1

Zombies are climbing over the poles, dunno why.
Here is the code
PHP код:
             new Float:x,Float:y,Float:z;
             
FCNPC_GetPosition(npcid,x,y,z);
             new 
Float:pxFloat:py;
             new 
Float:p,Float:p1,Float:p2;
             
GetPlayerPos(playerid,p,p1,p2);
             
GetPointInFront2D(x,y,FCNPC_GetAngle(npcid),1.0,px,py);
        
             
//  Check collision
             
if(IsBetweenElementToPointIsWall(px,py,z,npcid,item_fcnpc) || IsPointInWaterOrientOfElement(npcid,item_fcnpc,3.0,o_front))
             {
                
FCNPC_SetAngle(npcidRandomFloat(0.0,360.0));
             }
             else 
// No collision, move.
             
{
                      new 
rand random(3);
                    switch(
rand)
                    {
                       case 
0FCNPC_GoTo(npcid,  pxpyzMOVE_TYPE_WALK0.1);
                       case 
1FCNPC_GoTo(npcid,  pxpyzMOVE_TYPE_WALK0.2);
                       case 
2FCNPC_GoTo(npcid,  pxpyzMOVE_TYPE_WALK0.3);
                       case 
3FCNPC_GoTo(npcid,  pxpyzMOVE_TYPE_WALK0.4);
                    }
             } 
Reply


Messages In This Thread
Zombies climbing over poles. - by StrikerZ - 29.09.2017, 15:49
Re: Zombies climbing over poles. - by Bigwebicek - 29.09.2017, 15:52
Re: Zombies climbing over poles. - by StrikerZ - 29.09.2017, 15:54
Re: Zombies climbing over poles. - by whadez - 29.09.2017, 16:07
Re: Zombies climbing over poles. - by AbyssMorgan - 29.09.2017, 16:20
Re: Zombies climbing over poles. - by StrikerZ - 29.09.2017, 16:38
Re: Zombies climbing over poles. - by Marricio - 29.09.2017, 18:45
Re: Zombies climbing over poles. - by StrikerZ - 30.09.2017, 06:00
Re: Zombies climbing over poles. - by Marricio - 30.09.2017, 15:11

Forum Jump:


Users browsing this thread: 1 Guest(s)