NPC help! !! REP+++
#7

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!!
Reply


Messages In This Thread
NPC help! !! REP+++ - by MasonSFW - 04.10.2014, 12:08
Re: NPC help! !! REP+++ - by MasonSFW - 04.10.2014, 12:31
Re: NPC help! !! REP+++ - by Dangjai - 04.10.2014, 13:25
Re: NPC help! !! REP+++ - by MasonSFW - 04.10.2014, 13:50
Re: NPC help! !! REP+++ - by ThunderX - 04.10.2014, 16:13
Re: NPC help! !! REP+++ - by MasonSFW - 05.10.2014, 01:43
Re: NPC help! !! REP+++ - by ThunderX - 05.10.2014, 05:31
Re: NPC help! !! REP+++ - by MasonSFW - 05.10.2014, 05:39

Forum Jump:


Users browsing this thread: 1 Guest(s)