A couple PropSpawner changes #5
@@ -762,6 +762,13 @@ public Action OnPropTakeDamage(int victim, int &attacker, int &inflictor, float
|
|||||||
void DisplayNotifyList()
|
void DisplayNotifyList()
|
||||||
{
|
{
|
||||||
static int channel = -1;
|
static int channel = -1;
|
||||||
|
static float lastDisplayTime = 0.0;
|
||||||
|
|
||||||
|
// Change the channel every once in a while, to avoid conflicts with the map's game_text entities
|
||||||
|
// (not really sure if sourcemod accounts for them when using -1 as channel but hopefully it does)
|
||||||
|
if ((GetEngineTime() - lastDisplayTime) > g_cvNotifyTimer.FloatValue)
|
||||||
|
channel = -1;
|
||||||
|
|
||||||
char text[255];
|
char text[255];
|
||||||
strcopy(text, sizeof(text), "Shooting Couch:\n");
|
strcopy(text, sizeof(text), "Shooting Couch:\n");
|
||||||
|
|
||||||
@@ -791,6 +798,8 @@ void DisplayNotifyList()
|
|||||||
if (IsClientInGame(i))
|
if (IsClientInGame(i))
|
||||||
channel = ShowHudText(i, channel, text);
|
channel = ShowHudText(i, channel, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lastDisplayTime = GetEngineTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnNotifyTimer(Handle timer, any data)
|
void OnNotifyTimer(Handle timer, any data)
|
||||||
|
|||||||
Reference in New Issue
Block a user