Quote:
Originally Posted by draft
1) How to correctly kill main base ?
2) How to correctly change dota gamemode? When trying to setup CM, server is freezing after first player connects...
3) In mid only I got first wave of creeps on gamestate = 3, not in state = 4. Is it possible to fix it?
4) How can i cancel the game? When im trying to changelevel during gamestate = 4 (game in progress), server is usually terminating.
Few code examples would be very nice.
|
1)
PHP Code:
void Dota_DefeatTeam(int team_index)
{
int fort = (team_index == 2 ? GameRules_GetPropEnt("m_hGoodGuyFort") : GameRules_GetPropEnt("m_hBadGuyFort"));
SDKHooks_TakeDamage(fort, 0, 0, float(GetEntProp(fort, Prop_Send, "m_iHealth")));
}
2,3,4 dunno, work for me, that when I change settings
PHP Code:
public bool OnClientConnect(int player, char[] message, int message_length)
{
if (IsFakeClient(player))
return true;
static bool trigger;
else if (!trigger)
{
if (<myvar> <= 2)
g_bSoloMid = true;
ServerCommand("dota_wait_for_players_to_load_timeout 300");
ServerCommand("dota_force_gamemode %d", (g_bSoloMid ? SOLO_MID : CAPTAIN_MODE));
ServerCommand("dota_wait_for_players_to_load_count %d", <myvar>);
if (g_bSoloMid)
ServerCommand("sv_alltalk 1");
ServerCommand("changelevel dota");
trigger = true;
}
return true;
}