КТ вышел, раунд кончился.

Equiment

Участник
Сообщения
35
Реакции
16
Спасибо Primo
 
Последнее редактирование:

Primo

типа серьёзный тип
Сообщения
1,532
Реакции
763
PHP:
public OnClientDisconnect(client)
{
	if(GetClientTeam(client) == 3)
	{
		// 3 - Time (in seconds) to delay before new round starts
		// reason - Reason for the round ending
		// false - (blockhook)Set to true to stop the corresponding CS_OnTerminateRound forward from being called.
		CS_TermianteRound(3, reason, false);
	}
}

мб так? Я не знаю, будет ли CS_TermianteRound работать
 

Primo

типа серьёзный тип
Сообщения
1,532
Реакции
763
PHP:
#include <sourcemod>
#include <cstrike>
#include <sdktools>

public OnPluginStart()
{
    HookEvent("player_disconnect", OnClientDisconnect);
}

public OnClientDisconnect(Handle:event, const String:name[], bool:dontBroadcast) 
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    if(GetClientTeam(client) == 3) 
    { 
        // 3 - Time (in seconds) to delay before new round starts 
        // reason - Reason for the round ending 
        // false - (blockhook)Set to true to stop the corresponding CS_OnTerminateRound forward from being called. 
        CS_TermianteRound(1, 15, false); 
    } 
}

И какая ошибка то?
 
Сообщения
2,587
Реакции
1,345
trial, правой кнопкой сверху консоли - свойства - поставить галочку - выделения мышью... И убирай из пути русские буквы, пригодится...
 

Primo

типа серьёзный тип
Сообщения
1,532
Реакции
763
PHP:
#include <sourcemod>
#include <cstrike>
#include <sdktools>

public OnPluginStart()
{
    HookEvent("player_disconnect", PlayerDisconnect);
}

public PlayerDisconnect(Handle:event, const String:name[], bool:dontBroadcast) 
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    if(GetClientTeam(client) == 3) 
    { 
        // 3 - Time (in seconds) to delay before new round starts 
        // reason - Reason for the round ending 
        // false - (blockhook)Set to true to stop the corresponding CS_OnTerminateRound forward from being called. 
        CS_TerminateRound(1.0, CSRoundEnd_Draw, false); 
    } 
}
 
Сверху Снизу