View Single Post
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 11-28-2011 , 13:25   Re: [CS:S] SoccerMod
Reply With Quote #15

Quote:
Originally Posted by St00ne View Post
Sorry but it seems that in the latest version models are still loaded only if sm_soccermod_enable is set to 1:

Code:
public OnMapStart()
{
  if (GetConVarInt(sm_soccermod_enable) == 1)
  {
        AddFileToDownloadsTable("materials/models/player/soccermod/termi/2010/home2/skin_foot_a2.vmt");
        AddFileToDownloadsTable("materials/models/player/soccermod/termi/2010/home2/skin_foot_a2.vtf");
        AddFileToDownloadsTable("models/player/soccermod/termi/2010/home2/ct_urban.dx80.vtx");
        AddFileToDownloadsTable("models/player/soccermod/termi/2010/home2/ct_urban.dx90.vtx");
        AddFileToDownloadsTable("models/player/soccermod/termi/2010/home2/ct_urban.mdl");
        AddFileToDownloadsTable("models/player/soccermod/termi/2010/home2/ct_urban.phy");
        AddFileToDownloadsTable("models/player/soccermod/termi/2010/home2/ct_urban.sw.vtx");
        AddFileToDownloadsTable("models/player/soccermod/termi/2010/home2/ct_urban.vvd");
        AddFileToDownloadsTable("models/player/soccermod/termi/2010/home2/ct_urban.xbox.vtx");
        AddFileToDownloadsTable("materials/models/player/soccermod/termi/2010/away2/skin_foot_a2.vmt");
        AddFileToDownloadsTable("materials/models/player/soccermod/termi/2010/away2/skin_foot_a2.vtf");
        AddFileToDownloadsTable("models/player/soccermod/termi/2010/away2/ct_urban.dx80.vtx");
        AddFileToDownloadsTable("models/player/soccermod/termi/2010/away2/ct_urban.dx90.vtx");
        AddFileToDownloadsTable("models/player/soccermod/termi/2010/away2/ct_urban.mdl");
        AddFileToDownloadsTable("models/player/soccermod/termi/2010/away2/ct_urban.phy");
        AddFileToDownloadsTable("models/player/soccermod/termi/2010/away2/ct_urban.sw.vtx");
        AddFileToDownloadsTable("models/player/soccermod/termi/2010/away2/ct_urban.vvd");
        AddFileToDownloadsTable("models/player/soccermod/termi/2010/away2/ct_urban.xbox.vtx");

    //PrecacheModel("models/player/soccermod/termi/2010/away2/ct_urban.mdl");
    //PrecacheModel("models/player/soccermod/termi/2010/home2/ct_urban.mdl");
  }
  PrecacheModel("models/player/soccermod/termi/2010/home2/ct_urban.mdl");
  PrecacheModel("models/player/soccermod/termi/2010/away2/ct_urban.mdl");
}
The models are prechached always, are not within the cvar (so the server does not freeze if you change the cvar suddenly), however the downloads are within the cvar for reducing download contents in maps that not are
soccer.

If you want that the soccer contents are downloaded in any map, you can use this code and recompile:

PHP Code:
public OnMapStart()
{
AddFileToDownloadsTable("materials/models/player/soccermod/termi/2010/home2/skin_foot_a2.vmt");
AddFileToDownloadsTable("materials/models/player/soccermod/termi/2010/home2/skin_foot_a2.vtf");
AddFileToDownloadsTable("models/player/soccermod/termi/2010/home2/ct_urban.dx80.vtx");
AddFileToDownloadsTable("models/player/soccermod/termi/2010/home2/ct_urban.dx90.vtx");
AddFileToDownloadsTable("models/player/soccermod/termi/2010/home2/ct_urban.mdl");
AddFileToDownloadsTable("models/player/soccermod/termi/2010/home2/ct_urban.phy");
AddFileToDownloadsTable("models/player/soccermod/termi/2010/home2/ct_urban.sw.vtx");
AddFileToDownloadsTable("models/player/soccermod/termi/2010/home2/ct_urban.vvd");
AddFileToDownloadsTable("models/player/soccermod/termi/2010/home2/ct_urban.xbox.vtx");
AddFileToDownloadsTable("materials/models/player/soccermod/termi/2010/away2/skin_foot_a2.vmt");
AddFileToDownloadsTable("materials/models/player/soccermod/termi/2010/away2/skin_foot_a2.vtf");
AddFileToDownloadsTable("models/player/soccermod/termi/2010/away2/ct_urban.dx80.vtx");
AddFileToDownloadsTable("models/player/soccermod/termi/2010/away2/ct_urban.dx90.vtx");
AddFileToDownloadsTable("models/player/soccermod/termi/2010/away2/ct_urban.mdl");
AddFileToDownloadsTable("models/player/soccermod/termi/2010/away2/ct_urban.phy");
AddFileToDownloadsTable("models/player/soccermod/termi/2010/away2/ct_urban.sw.vtx");
AddFileToDownloadsTable("models/player/soccermod/termi/2010/away2/ct_urban.vvd");
AddFileToDownloadsTable("models/player/soccermod/termi/2010/away2/ct_urban.xbox.vtx");

PrecacheModel("models/player/soccermod/termi/2010/away2/ct_urban.mdl");
PrecacheModel("models/player/soccermod/termi/2010/home2/ct_urban.mdl");

__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco