local change_amount = {} local plyr_in_zone = {} function lightzoneambient_init_name(e,name) change_amount[e] = tonumber(name) plyr_in_zone[e] = 0 end function lightzoneambient_main(e) if g_Entity[e]['plrinzone']==1 then if plyr_in_zone[e] == 0 then SetAmbienceIntensity(change_amount[e]) ActivateIfUsed(e) plyr_in_zone[e] = 1 end else plyr_in_zone[e] = 0 end end