Hey guys, I'm quite new to sourcemod and have been trying to replicate a gamemode known as zombie escape. Right now I'm trying to set the model of the T's. by doing this
PHP Code:
public void Terrorist(Event event, const char[] name, bool dontBroadcast)
{
for (int i = 1; i < GetMaxClients(); i++)
{
if (IsClientInGame(i) && GetClientTeam(i) == CS_TEAM_T)
{
SetEntityModel(i, "models/player/zombieescape/zm_undertaker.mdl")
}
}
}
then I call it like this
PHP Code:
// Called when map starts
public void OnMapStart()
{
// Undertaker
AddFileToDownloadsTable("models/player/zombieescape/zm_undertaker.mdl");
PrecacheModel("models/player/zombieescape/zm_undertaker.mdl", false);
HookEvent("round_start", Terrorist);
}
It's not setting the model, nothing is happening besides after about 5 - 8 seconds of being in game the server console gets this error: CMDLCache:: Out of memory
then the server crashes
Anyone here know why this is happening? Thanks!
__________________