05-07-2014, 06:27 PM
I have problem with my hud.
My entire sanity events .txt :
<InsanityEvents>
<SoundStream
Name = "event_1a"
Set = "PHONE"
MaxSanity = "95"
File = "silence.ogg"
Volume = "1"
SoundDelayTime = "0.2"
FadeScreen = "true"
FadeColor = "1 1 1 1"
FadeInTime = "0"
FadeOutTime = "1000000000"
FadeImageFile = "cbradio.tga"
DisablePlayer = "false"
/>
<SoundStream
Name = "event_1b"
Set = "PHONE"
MaxSanity = "95"
File = "silence.ogg"
Volume = "1"
SoundDelayTime = "0.2"
FadeScreen = "true"
FadeColor = "1 1 1 1"
FadeInTime = "0"
FadeOutTime = "1000000000"
FadeImageFile = "cbradio.tga"
DisablePlayer = "false"
/>
<SoundStream
Name = "event_1c"
Set = "PHONE"
MaxSanity = "95"
File = "silence.ogg"
Volume = "1"
SoundDelayTime = "0.2"
FadeScreen = "true"
FadeColor = "1 1 1 1"
FadeInTime = "0"
FadeOutTime = "1000000000"
FadeImageFile = "cbradio.tga"
DisablePlayer = "false"
/>
<SoundStream
Name = "event_m4"
Set = "M4A4"
MaxSanity = "95"
File = "silence.ogg"
Volume = "0"
SoundDelayTime = "0.2"
FadeScreen = "true"
FadeColor = "1 1 1 1"
FadeInTime = "0"
FadeOutTime = "1000000000"
FadeImageFile = "m4a4.tga"
DisablePlayer = "false"
/>
</InsanityEvents>
Script that i use:
To enable :
void GoCheckthehud(string &in Timer)
{
SetLocalVarInt("PHONEHUD", 1);
SetInsanitySetEnabled("HUD2", false);
SetInsanitySetEnabled("HUD3", false);
SetInsanitySetEnabled("HUD4", false);
SetInsanitySetEnabled("PHONE", true);
AddTimer("reconfigure", 0, "reconfigure");
AddTimer("startevent", 0.1, "startevent");
SetEntityActive("stopradio",true) ;
SetEntityActive("stopradio_1",true) ;
PlaySoundAtEntity("radko", "scpradio0r.snt", "Player", 0, true);
}
void reconfigure(string &in asTimer)
{
SetInsanitySetEnabled("HUD1", false);
SetInsanitySetEnabled("HUD2", false);
SetInsanitySetEnabled("HUD3", false);
SetInsanitySetEnabled("PHONE", true);
}
void startevent(string &in asTimer)
{
StartRandomInsanityEvent();
}
To Disable :
void GoStoptheHud(string &in entity)
{
SetInsanitySetEnabled("PHONE", false);
GiveItemFromFile("syr_2", "radio.ent");
SetEntityActive("stopradio",false) ;
SetEntityActive("stopradio_1",false) ;
SetGlobalVarInt("picked", 1);
AddTimer("config1", 0.1, "config1");
AddTimer("Used_timer", 1, "Used_timer");
StopSound("radko", 0.1);
}
void config1(string &in asTimer)
{
SetInsanitySetEnabled("Default", false);
SetInsanitySetEnabled("PHONE", false);
StartRandomInsanityEvent();
}
The problem is,It enables radio hud but...It also enables event_m4.
I want it to use radio only.But everytime it uses radio or m4 hud.
My entire sanity events .txt :
<InsanityEvents>
<SoundStream
Name = "event_1a"
Set = "PHONE"
MaxSanity = "95"
File = "silence.ogg"
Volume = "1"
SoundDelayTime = "0.2"
FadeScreen = "true"
FadeColor = "1 1 1 1"
FadeInTime = "0"
FadeOutTime = "1000000000"
FadeImageFile = "cbradio.tga"
DisablePlayer = "false"
/>
<SoundStream
Name = "event_1b"
Set = "PHONE"
MaxSanity = "95"
File = "silence.ogg"
Volume = "1"
SoundDelayTime = "0.2"
FadeScreen = "true"
FadeColor = "1 1 1 1"
FadeInTime = "0"
FadeOutTime = "1000000000"
FadeImageFile = "cbradio.tga"
DisablePlayer = "false"
/>
<SoundStream
Name = "event_1c"
Set = "PHONE"
MaxSanity = "95"
File = "silence.ogg"
Volume = "1"
SoundDelayTime = "0.2"
FadeScreen = "true"
FadeColor = "1 1 1 1"
FadeInTime = "0"
FadeOutTime = "1000000000"
FadeImageFile = "cbradio.tga"
DisablePlayer = "false"
/>
<SoundStream
Name = "event_m4"
Set = "M4A4"
MaxSanity = "95"
File = "silence.ogg"
Volume = "0"
SoundDelayTime = "0.2"
FadeScreen = "true"
FadeColor = "1 1 1 1"
FadeInTime = "0"
FadeOutTime = "1000000000"
FadeImageFile = "m4a4.tga"
DisablePlayer = "false"
/>
</InsanityEvents>
Script that i use:
To enable :
void GoCheckthehud(string &in Timer)
{
SetLocalVarInt("PHONEHUD", 1);
SetInsanitySetEnabled("HUD2", false);
SetInsanitySetEnabled("HUD3", false);
SetInsanitySetEnabled("HUD4", false);
SetInsanitySetEnabled("PHONE", true);
AddTimer("reconfigure", 0, "reconfigure");
AddTimer("startevent", 0.1, "startevent");
SetEntityActive("stopradio",true) ;
SetEntityActive("stopradio_1",true) ;
PlaySoundAtEntity("radko", "scpradio0r.snt", "Player", 0, true);
}
void reconfigure(string &in asTimer)
{
SetInsanitySetEnabled("HUD1", false);
SetInsanitySetEnabled("HUD2", false);
SetInsanitySetEnabled("HUD3", false);
SetInsanitySetEnabled("PHONE", true);
}
void startevent(string &in asTimer)
{
StartRandomInsanityEvent();
}
To Disable :
void GoStoptheHud(string &in entity)
{
SetInsanitySetEnabled("PHONE", false);
GiveItemFromFile("syr_2", "radio.ent");
SetEntityActive("stopradio",false) ;
SetEntityActive("stopradio_1",false) ;
SetGlobalVarInt("picked", 1);
AddTimer("config1", 0.1, "config1");
AddTimer("Used_timer", 1, "Used_timer");
StopSound("radko", 0.1);
}
void config1(string &in asTimer)
{
SetInsanitySetEnabled("Default", false);
SetInsanitySetEnabled("PHONE", false);
StartRandomInsanityEvent();
}
The problem is,It enables radio hud but...It also enables event_m4.
I want it to use radio only.But everytime it uses radio or m4 hud.