[Ajuda] Animaзoes Travadas
#1

Olб Galera venho aqui perguntar o que estб errado
Exemplo: eu digito /gro de boa eu sento mais pra sair do /gro sу com /stopani que eu jб tenho queria saber Como faзo para Somente eu apertar ENTER JБ DESFAS a Animaзгo
pawn Код:
if (strcmp(cmd, "/deitar", true) == 0)
    {
        ApplyAnimation(playerid, "BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
        return true;
    }
    if (strcmp(cmd, "/abaixar", true) == 0)
    {
        ApplyAnimation(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0);
        return true;
    }
    if (strcmp(cmd, "/fumar", true) == 0)
    {
        ApplyAnimation(playerid, "SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
        return true;
    }
    if (strcmp(cmd, "/gro", true) == 0)
    {
        ApplyAnimation(playerid, "BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0);
        return true;
    }
Reply
#2

Nгo testei mais deve dar certo,qualquer erro so falar
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys == 16)
{
 ClearAnimations(playerid);
}
	return 1;
}
Reply
#3

Quote:
Originally Posted by tecsites
Посмотреть сообщение
Nгo testei mais deve dar certo,qualquer erro so falar
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys == 16)
{
 ClearAnimations(playerid);
}
	return 1;
}
Vish n funfo
Reply
#4

Manda o comando /stopani
Reply
#5

pawn Код:
if(strcmp(cmd,"/stopani",true)==0 || strcmp(cmd,"/pararanim",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
        if(PlayerToPoint(3.0,playerid,2144.3711,1641.4792,993.5761) || PlayerToPoint(3.0,playerid,303.9886,-169.0725,999.5938) || PlayerToPoint(3.0,playerid,294.8029,-57.8727,1001.5156) || PlayerToPoint(3.0,playerid,162.1254,-79.7925,1001.8047) ||
        PlayerToPoint(3.0,playerid,211.3817,-96.1272,1005.2578) || PlayerToPoint(3.0,playerid,820.8934,8.5365,1004.1958) || PlayerToPoint(3.0,playerid,205.4959,-11.5585,1005.2109))
        {
            SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode usar este comnado agora!");
            return true;
        }
            ClearAnimations(playerid);
            ClearAnimations(playerid);
        }
        return true;
    }
Reply
#6

Quote:
Originally Posted by darkturque
Посмотреть сообщение
pawn Код:
if(strcmp(cmd,"/stopani",true)==0 || strcmp(cmd,"/pararanim",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
        if(PlayerToPoint(3.0,playerid,2144.3711,1641.4792,993.5761) || PlayerToPoint(3.0,playerid,303.9886,-169.0725,999.5938) || PlayerToPoint(3.0,playerid,294.8029,-57.8727,1001.5156) || PlayerToPoint(3.0,playerid,162.1254,-79.7925,1001.8047) ||
        PlayerToPoint(3.0,playerid,211.3817,-96.1272,1005.2578) || PlayerToPoint(3.0,playerid,820.8934,8.5365,1004.1958) || PlayerToPoint(3.0,playerid,205.4959,-11.5585,1005.2109))
        {
            SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode usar este comnado agora!");
            return true;
        }
            ClearAnimations(playerid);
            ClearAnimations(playerid);
        }
        return true;
    }
WHAT ?
pawn Код:
//
            ClearAnimations(playerid);
            ClearAnimations(playerid);
Pra que duplicar a funзгo ?
Reply
#7

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if ((newkeys==16))
    {
        OnPlayerCommandText(playerid,"/stopani");
    }
    return 0;
}
Reply
#8

Simples:

na public: public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

ponha isso:

pawn Код:
if ((newkeys==KEY_SECONDARY_ATTACK)) // muda aki para a tecla que kizer :D
    {
        OnPlayerCommandText(playerid,"/stopani");
    }

Deixe ela assim:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if ((newkeys==KEY_SECONDARY_ATTACK))
    {
        OnPlayerCommandText(playerid,"/stopani");
    }
    return 1;
}
Ajudei? Rep +
Reply
#9

Ou vocк pode aplicar a animaзгo assim:
pawn Код:
if (strcmp(cmd, "/gro", true) == 0)
    {
        ApplyAnimation(playerid, "BEACH", "ParkSit_M_loop", 4.1,0,1,1,1,1);
        return true;
    }
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)