diff --git a/Leader2/scripting/Leader2.sp b/Leader2/scripting/Leader2.sp index 71d26a7e..86a4011a 100644 --- a/Leader2/scripting/Leader2.sp +++ b/Leader2/scripting/Leader2.sp @@ -173,16 +173,6 @@ public void ConVarChange(ConVar CVar, const char[] oldVal, const char[] newVal) //---------------------------------------------------------------------------------------------------- public void OnMapStart() { - AddFileToDownloadsTable(DefendVTF); - AddFileToDownloadsTable(DefendVMT); - AddFileToDownloadsTable(FollowVTF); - AddFileToDownloadsTable(FollowVMT); - - PrecacheGeneric(DefendVTF, true); - PrecacheGeneric(DefendVMT, true); - PrecacheGeneric(FollowVTF, true); - PrecacheGeneric(FollowVMT, true); - Handle gameConfig = LoadGameConfigFile("funcommands.games"); if (gameConfig == null) { @@ -203,6 +193,22 @@ public void OnMapStart() UpdateLeaders(); } +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnConfigsExecuted() +{ + AddFileToDownloadsTable(DefendVTF); + AddFileToDownloadsTable(DefendVMT); + AddFileToDownloadsTable(FollowVTF); + AddFileToDownloadsTable(FollowVMT); + + PrecacheGeneric(DefendVTF, true); + PrecacheGeneric(DefendVMT, true); + PrecacheGeneric(FollowVTF, true); + PrecacheGeneric(FollowVMT, true); +} + //---------------------------------------------------------------------------------------------------- // Purpose: //---------------------------------------------------------------------------------------------------- @@ -1233,4 +1239,4 @@ public Action VoteLeader(int client, int argc) } return Plugin_Handled; -} +} \ No newline at end of file