Maybe cuase when you turn on the nightmode thing, it sets the task to run infinite amount of times, which includes even after you turn it off. I'd say have the task set up another function that checks whether its night or day
oh and put the set_task into the public plugin_init().
Add also a global variable that holds whether its night or day, like I don't know, 1 is night 0 is day?
So I unno like
Code:
bool:g_Night // False = Day || True = Night
public plugin_init() {
register_plugin(PLUGIN,VERSION,AUTHOR)
set_task(12.0, "CheckTime", id, _, _, "b")
}
public CheckTime(id) {
if(!g_Night) {
set_hudmessage(0, 255, 0, -1.0, 0.2, 0, 6.0, 4.0)
show_hudmessage(0, "Night Hour DISABLED")
set_lights("#OFF")
}
else {
set_hudmessage(0, 255, 0, -1.0, 0.2, 0, 6.0, 4.0)
show_hudmessage(0, "Night Hour ENABLED")
set_lights("aaaaaaaaaaabbbbbaaa")
lightning(id)
client_cmd(0, "spk ambience/wolfhowl01.wav")
}
}
something like that you know?
__________________