CODE 1
void OnStart()
{
SetEntityConnectionStateChangeCallback("coal_lever", "BurnerFail");
}
void BurnerFail(string &in asEntity, int alState)
{
if(alState == 1) //1 up, -1 down, 0 between
{
if(GetLocalVarInt("Coal") < 3)
{
SetMessage("Messages", "BurnerNotReady", 0);
}
else
{
//Put command here... (Delete the else part if you already had another parameter for the success coal part.
}
}
}
CODE 2
void CheckCoalCount()
{
if(GetLocalVarInt("Coal") == 3)
{
SetMessage("Messages", "BurnerReady", 0);
PlaySoundAtEntity("BurnerSound", "general_fire_burning", "AreaBurnerParticle", 1, true);
CreateParticleSystemAtEntity("Fire", "ps_fire_stove_small.ps", "AreaBurnerParticle", true);
//Put the CPSAT and the PSAT on the machinery lever part.
}