03-02-2013, 03:57 AM
I need a little help. When I push the button, the lamp gets on. But when I push it again it will just stay on, insteadt off. What do I need to add/change?
PHP Code:
void OnStart()
{
SetLocalVarInt("Var1", 0);
SetEntityPlayerInteractCallback("button1", "func1", false);
}
void func1(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
SetLampLit("bonfire1", true, true);
PlaySoundAtEntity("", "spot.snt", "bonfire1", 0.5f, false);
}