Detecter perca de muniзгo
#1

Alguйm teria alguma forma? Tentei, tentei e nгo consegui. Preciso disso, pra saber realmente se o player estб atirando.
Atй mais.
Reply
#2

pawn Код:
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys)
{
if ( newkeys == KEY_FIRE)
{
SendClientMessage(playerid,COR,"Vocк ta atirando RIARIAIRAIAR");
}
return 1;
}
Reply
#3

Isso eu sei, mas nгo serve. :/
Tem que calcular se a muniзгo diminui.
Reply
#4

Eu acho que nгo й sу no mouse que atira nao viu Knife '-'
Reply
#5

pawn Код:
public OnPlayerUpdate(playerid)
{
    static Count,Ammo,Ping;
    Ping = GetPlayerPing(playerid);
    if(Count > Ping - (Ping / 2))
    {
        if(Ammo != GetPlayerAmmo(playerid))
        {
            Count = 0;
            //municao perdida
        }
       
    }
    else
    {
        Ammo = GetPlayerAmmo(playerid);
        ++Count;
    }
    return true;
}
Reply
#6

Sim Sim , atira com varias teclas. Mas eu tinha entendido a pergunta dele se tem como verificar se o cara tava atirando ._.
Reply
#7

Tem um include pra checar se o player acertou outro player.

https://sampforum.blast.hk/showthread.php?tid=195439

Agora pra checar se ele atirou, nгo sei.
Reply
#8

Sempre me ignorando essas pessoas,que feio,agora atй me sinto triste

pawn Код:
public OnPlayerUpdate(playerid)
{
    static Count,Ammo,Ping;
    Ping = GetPlayerPing(playerid);
    if(Count > Ping - (Ping / 2))
    {
        if(Ammo != GetPlayerAmmo(playerid))
        {
            Count = 0;
            //municao perdida
        }
       
    }
    else
    {
        Ammo = GetPlayerAmmo(playerid);
        ++Count;
    }
    return true;
}
NOVAMENTE /\
Reply
#9

Drakins, seu mйtodo funcionou, porйm o cбlculo ficou lento com as sub-metralhadores e fuzis. Eu fiz aqui de outro jeito, usei SetTimer mesmo.
Obrigado pela ajuda e atenзгo manolinhos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)