[Ajuda] Se levou tiro em menos de 1 minuto, nгo pode executar este comando.
#3

Quote:
Originally Posted by [FeK]Knife
Посмотреть сообщение
http://forum.sa-mp.com/showthread.ph...onplayerdamage
Baixe essa include e depois faзa isto :

pawn Код:
// Comeзo do GM
new
    LevouumTiro [ MAX_PLAYERS ] ;

//CMD
CMD:fumar(playerid)
{
    if ( LevouumTiro [ playerid ] == 1 ) return SendClientMessage ( playerid , -1 , "Vocк levou um Tiro !" ) ;
    if(Quantidade[playerid] == 0) return GameTextForPlayer(playerid, "Sem Cigarros",4000,3);
    ApplyAnimation(playerid, "SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
    GameTextForPlayer(playerid, "~r~Vocк estб fumando um cigarro!",5000,1);
    Quantidade[playerid] -= 1;
    new Float:Vida;
    GetPlayerHealth(playerid, Vida);
    SetPlayerHealth(playerid, Vida+5);
    return 1;
}  

//Public
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
    if(LevouumTiro [ playerid ] == 0 && weaponid >= 1 /* Mude pela arma que deseja */) return LevouumTiro [ playerid ] = 1 , SetTimer("LevouTiro", 60000, 0);
    return true;
}

forward LevouTiro ( playerid ) ;
public LevouTiro ( playerid )
    return LevouumTiro [ playerid ] = 0 ;
Teste aн , mals ae , fiz na velocidade aqui , to vendo tv xD
no Lugar de SetTimer nao seria SetTimerEx?
e tbm seria melhor trocar OnPlayerGiveDamage por OnPlayerTakeDamage..
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)