while playing my game, i wait for 12 secs for the special effects and crap to happen but when it does. It crashes the game with no error messages...
Code:
public lighting(id)
{
client_cmd(0, "spk ambience/thunder_clap.wav")
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id)
write_short(1<<10)
write_short(1<<10)
write_short(0x0000)
write_byte(0)
write_byte(255)
write_byte(255)
write_byte(255)
message_end()
}
public admin_dark(id, level, cid) {
if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
new arg[32]
read_argv(1,arg,31);
if(arg[0] == '1')
{
set_hudmessage(0, 255, 0, -1.0, 0.2, 0, 6.0, 4.0)
show_hudmessage(0, "Night Hour ENABLED")
set_lights("aaaaaaaaaaabbbbbaaa")
set_task(12.0, "lighting", 0, _, _, "b")
client_cmd(0, "spk ambience/wolfhowl01.wav")
}
else if(arg[0] == '0')
{
set_hudmessage(0, 255, 0, -1.0, 0.2, 0, 6.0, 4.0)
show_hudmessage(0, "Night Hour DISABLED")
set_lights("#OFF")
}
return PLUGIN_HANDLED
}
but when i took out the screenfade part, everything works pefectly BUT when i set things back to normal