#include <amxmodx>
#include <zombieplague>
public plugin_init()
{
register_plugin("Ceata", "1.0", "EDUTz")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
}
public plugin_cfg() set_task(0.6, "event_round_start")
public event_round_start() ceata(0, .edy3 = true)
public client_putinserver(id) ceata(id, .edy3 = true);
public zp_round_started(gamemode)
{
if(gamemode == MODE_INFECTION) ceata(0, 0, 0, 0, 0.0008);
if(gamemode == MODE_NEMESIS) ceata(0, 100, 100, 0, 0.0008);
if(gamemode ==MODE_SURVIVOR) ceata(0, 0, 100, 0, 0.0008);
if(gamemode ==MODE_SWARM) ceata(0, 0, 0, 100, 0.0008);
if(gamemode ==MODE_MULTI) ceata(0, 100, 0, 0, 0.0008);
if(gamemode ==MODE_PLAGUE) ceata(0, 100, 100, 100, 0.0005);
}
stock ceata (const edy1 = 0, const rosu = 127, const verde = 127, const albastru = 127, const Float:edy2 = 0.001, bool:edy3 = false)
{
static msgFog;
if (msgFog || (msgFog = get_user_msgid("Fog")))
{
new edy4 = _:floatclamp(edy2, 0.0001, 0.25) * _:!edy3;
message_begin(edy1 ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, msgFog, .player = edy1);
write_byte(clamp(rosu, 0, 255));
write_byte(clamp(verde, 0, 255));
write_byte(clamp(albastru , 0, 255));
write_byte((edy4 & 0xFF));
write_byte((edy4 >> 8) & 0xFF);
write_byte((edy4 >> 16) & 0xFF);
write_byte((edy4 >> 24) & 0xFF);
message_end();
}
}