[Ajuda] Parar qualquer animaзгo
#1

Olб qria uma coisa simples q ainda nгo sei ;p, um comando de parar qualquer animaзгo com enter ! pls REP+
Reply
#2

pawn Код:
public OnPlayerKeyStateChange ( playerid , newkeys , oldkeys ) if ((newkeys==KEY_SECONDARY_ATTACK)) OnPlayerCommandText(playerid,"/animeoff");

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/animeoff", true))
    {
        ClearAnimations(playerid);
        return 1;
    }
    return 0;
}
@Edit
Reply
#3

Nгo pow, Tipo essa dai eu tenho mas qria na onplayerkeystatechange, pra quando apertasse enter paresse entende ?
Reply
#4

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
       if ((newkeys==KEY_SECONDARY_ATTACK)) // Key ( F / Enter )
       {
            OnPlayerCommandText(playerid,"/animeoff");
       }
return 1;
}
Reply
#5

Quote:
Originally Posted by RoacH`
Посмотреть сообщение
pawn Код:
public OnPlayerKeyStateChange ( playerid , newkeys , oldkeys ) if ((newkeys==KEY_SECONDARY_ATTACK)) OnPlayerCommandText(playerid,"/animeoff");

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/animeoff", true))
    {
        ClearAnimations(playerid);
        return 1;
    }
    return 0;
}
@Edit
quando eu fui posta o meu tu posta Lol
Reply
#6

Agr quando entro no carro n consigo '-'
Reply
#7

pawn Код:
new bool:animm[MAX_PLAYERS]; //topo

//ao executar um anim
animm[playerid] = true;

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
    if(newkeys & KEY_SECONDARY_ATTACK && animm[playerid] == true)
        ClearAnimations(playerid);
        animm[playerid] = false;
    return true;
}
Reply
#8

Rep + zbt eu tinha feito isso a humildadeforever me ajudou , mas em vez de colocar ClearAnimations(playerid);, eu tinha colocado outro comando Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)