[Ajuda] Nгo seta a animaзгo
#1

Olб galera, venho pedir a ajuda de vocкs devido a um problema que to passando com um comando! Fiz o comando abaixo para minerar um certo ponto atй ai ta certo, mas o mesmo precisa ser usado 2 vezes para a animaзгo ser setada, eu agradeзo se puderem me ajudar!

pawn Код:
//Minerar
CMD:minerar(playerid)
{
    if(Jogador[playerid][Emprego] == 2)
    {
        if(LocalMineracao(playerid))
        {
            if(EstaMinerando[playerid] == 1)
            {
                SendClientMessage(playerid,-1,"{FFA500}[Minas SA]: {FFFFFF}Vocк jб esta minerando.!");
                return 1;
            }
            EstaMinerando[playerid] = 1;
            GivePlayerWeapon(playerid,6,1);
            SetTimerEx("Minerando",60000,0,"d",playerid);
            ApplyAnimation(playerid,"CHAINSAW","CSAW_1",4.1,0,1,1,1,0);
            SendClientMessage(playerid,-1,"{FFA500}[Minas SA]: {FFFFFF}Vocк esta minerando. Espere 1 minuto para terminar!");
        }
        else
        {
            SendClientMessage(playerid,-1,"{FFA500}[Minas SA]: {FFFFFF}Vocк nгo esta no ponto de mineraзгo!");
            return 1;
        }
    }
    else
    {
        SendClientMessage(playerid,-1,"{FFA500}[Minas SA]: {FFFFFF}Vocк nгo й um de nossos trabalhadores!");
    }
    return 1;
}
Reply
#2

Use um sistema do ipsBruno:
pawn Код:
//Topo:
static animLibName[MAX_PLAYERS][2][32]; // ipsBruno
//Solto pelo GM:
forward PlayerSetAnimation(playerid, Float:fDelta, loop, lockx, locky, freeze, time, forcesync);
public PlayerSetAnimation(playerid, Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
    return ApplyAnimation(playerid, animLibName[playerid][0], animLibName[playerid][1], fDelta, loop, lockx, locky, freeze, time, forcesync);

stock ApplyPlayerAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0) {

    forcesync = 1;

    ApplyAnimation(playerid, animlib, "null", fDelta, loop, lockx, locky, freeze, time, forcesync);

    ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync);

    format(animLibName[playerid][0], 32, animlib    );
    format(animLibName[playerid][1], 32, animname   );

    return SetTimerEx("PlayerSetAnimation", 550, false, "ifdddddd",  playerid, fDelta, loop, lockx, locky, freeze, time, forcesync);
}
Agora, edite seu script:
pawn Код:
CMD:minerar(playerid)
{
    if(Jogador[playerid][Emprego] != 2) return SendClientMessage(playerid,-1,"{FFA500}[Minas SA]: {FFFFFF}Vocк nгo й um de nossos trabalhadores!");
    if(!LocalMineracao(playerid)) return SendClientMessage(playerid,-1,"{FFA500}[Minas SA]: {FFFFFF}Vocк nгo esta no ponto de mineraзгo!");
    if(EstaMinerando[playerid] == 1) return SendClientMessage(playerid,-1,"{FFA500}[Minas SA]: {FFFFFF}Vocк jб esta minerando.!");
    EstaMinerando[playerid] = 1;
    GivePlayerWeapon(playerid,6,1);
    SetTimerEx("Minerando",60000,0,"d",playerid);
    ApplyPlayerAnimation(playerid,"CHAINSAW","CSAW_1",4.1,0,1,1,1,0);
    SendClientMessage(playerid,-1,"{FFA500}[Minas SA]: {FFFFFF}Vocк esta minerando. Espere 1 minuto para terminar!");
    return 1;
}
Reply
#3

Valeu! +Rep
Reply
#4

Quote:
Originally Posted by Cidiei
Посмотреть сообщение
Valeu! +Rep
Precisar estamos ai
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)