[Ajuda] Reconhecer agaixado
#1

Eu queria saber se йpossivel fazer com que esse codigo (faz o zombie correr atraz de vocк) nгo funcione,ou a distance tem qe ser menor para o jogador agaixado,porem nao descobri como faz para reconhecer se ele esta agaixado:

PHP код:
public CheckCloserPlayers(playerid){ // Detecta player mais perto e vai atras
    
if( Zombies[playerid][LastZombieHealth] > 0.0 ){
        new 
cp GetClosestPlayer(playerid);
        new 
Float:MinDistance 3.0;
        if(
IsPlayerInAnyVehicle(cp)){ MinDistance 5.0; }
        
Zombies[playerid][ZombieTarget] = cp;
        if(
GetDistanceToPlayer(playerid,cp) <= 40.0 && GetDistanceToPlayer(playerid,cp) > 10.0){
            
IrParaPlayer(1,playerid,cp);
        }else if(
GetDistanceToPlayer(playerid,cp) <= 15.0 && GetDistanceToPlayer(playerid,cp) > MinDistance){
            
IrParaPlayer(0,playerid,cp);
        }else if(
GetDistanceToPlayer(playerid,cp) <= MinDistance){
            
Parar(playerid);
        }
        if(
GetDistanceToPlayer(playerid,cp) <= MinDistance){
            new 
Float:h;
            if(
IsPlayerInAnyVehicle(cp)){
                new 
cpc GetPlayerVehicleID(cp);
                
GetVehicleHealth(cpc,h);
                if(
GetDistanceToPlayer(playerid,cp) < MinDistance){
                    
SetVehicleHealth(cpc,h-80.0);
                    
ApplyAnimation(playerid,"Gangs","shake_carSH",1,1,1,0,0,0);
                }
            }else{
                
GetPlayerHealth(cp,h);
                if(
GetDistanceToPlayer(playerid,cp) > 0.0){
                    
SetPlayerHealth(cp,h-5.0);
                    
ApplyAnimation(playerid,"FIGHT_D","FightD_3",1,1,0,0,1,0);
                }
                }
            }
        }

Reply
#2

UP Alguem ai sabe ?
Reply
#3

Alguem ? :S
Reply
#4

Cuidade com doublepost, pode ocasionar ban, atento as regras .
Reply
#5

Nгo sei se tem como, mas tenta verificar se o player esta na animaзгo de ficar agaixado
Reply
#6

Para detectar animaзхes use GetPlayerAnimationIndex
Reply
#7

pawn Код:
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DUCK)
   return SendClientMessage(playerid, -1, "Vocк estб agachado");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)