Author Topic: L4D2 Game Files Precacher  (Read 623 times)

diceboy

  • *
  • Posts: 34
    • View Profile
L4D2 Game Files Precacher
« on: December 13, 2018, 05:25:11 am »
Hi , I want to install game files precacher on my server but there is a sense to precache files which are removed from config's like acemod or zonemod ? Im talkin for exaple about a Witch on zonemod. Or maybe someone can tell which files should be precached (most crucial for confogl configs) Thanks for any reply
« Last Edit: December 13, 2018, 02:41:47 pm by diceboy »

Re: L4D2 Game Files Precacher
« Reply #1 on: October 04, 2019, 02:57:01 am »
Code: [Select]
#pragma semicolon 1
#pragma newdecls required
#include <sourcemod>
#include <sdktools>

public Plugin myinfo =
{
name = "L4D2 CACHE",
author = "BUD",
};

public void OnPluginStart()
{
char game_name[64];
GetGameFolderName(game_name, sizeof(game_name));
if (!StrEqual(game_name, "left4dead2", false))
{
SetFailState("L4D2 CACHE");
}
}

public void OnMapStart()
{
PrecacheModel("models/infected/witch.mdl", true);
PrecacheModel("models/infected/witch_bride.mdl", true);
PrecacheSound("player/neck_snap_01.wav", true);
}


like this?

 

A dedicated community website to competitive L4D and L4D2, ran by the community, for the community. L4DNation supports all continents of play and focuses on bringing together the community as a whole to a central hub of information.