Aw, yeah! That's what I was looking for!
I've tried to implement it, but it's not working, though. Here's the relevant code, that ultimately results in nothing. What am I doing incorrectly?
PHP Code:
...
new String:StunOverlay[17] = "overlays/firestun";
new String:StunOverlay_VTF[31] = "materials/overlays/firestun.vtf";
new String:StunOverlay_VMT[31] = "materials/overlays/firestun.vmt";
...
public OnMapStart() {
AddFileToDownloadsTable(StunOverlay_VTF);
AddFileToDownloadsTable(StunOverlay_VMT);
PrecacheDecal(StunOverlay_VTF, true);
}
public OnGameFrame() {
if(!CvarMasterSwitch) return;
new Float:tick = GetTickInterval();
for(new i = 1; i <= MaxClients; i++) {
if(!IsClientInGame(i) || !IsPlayerAlive(i) || TF2_GetPlayerClass(i) == TFClass_Pyro || !TF2_IsPlayerInCondition(i, TFCond_OnFire)) BurnTimers[i] = 0.0;
else if(TF2_IsPlayerInCondition(i, TFCond_OnFire)) {
if(CvarPanic && BurnTimers[i] >= 0.0) {
BurnTimers[i] -= tick;
if(BurnTimers[i] <= 0.0) {
Client_SetScreenOverlay(i, "off");
Client_SetScreenOverlay(i, "");
BurnTimers[i] = 0.0;
}
else if(CvarPanic) {
Client_SetScreenOverlay(i, StunOverlay_VTF);
if(TF2_GetPlayerClass(i) == TFClass_Scout) SetEntPropFloat(i, Prop_Send, "m_flMaxspeed", GetConVarFloat(CvarScoutPanic));
else if(TF2_GetPlayerClass(i) == TFClass_Soldier) SetEntPropFloat(i, Prop_Send, "m_flMaxspeed", GetConVarFloat(CvarSoldierPanic));
else SetEntPropFloat(i, Prop_Send, "m_flMaxspeed", GetConVarFloat(CvarPanicSpeed));
}
}
}
}
}
...
I ripped the code from
CS:Online Overlays, which may have been where I went wrong.