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 ;