Добавил 17 сеток. Каждый раунд одна из 17 сеток пропадает, может 1, 7 или 10(рандомно). csgo
эта проблема возникает при 15 и более игроках.
UsePlayersBZ "0"
Не работает. Items created: 0@acrobite, ты про это?
Попробуй эту версию (при создании пропов через конфиг в консоли сервера будет писаться "Items created: %число%"):
И что должно измениться? В консольке пишет Items created: 15 , да, всего их 15. Но заспавлено 14 из 15, 1 рандомная сетка пропадает.@acrobite, в строке 753 замени if(iEntity != -1) return false; на if(iEntity == -1) return false;
Потому и 0.
Перезалил файл с исправлением.
Может просто с квотой проблема?И что должно измениться? В консольке пишет Items created: 15 , да, всего их 15. Но заспавлено 14 из 15, 1 рандомная сетка пропадает.
Подсчет игроков выключен.Может просто с квотой проблема?
public void OnClientPutInServer(int iClient)
{
SDKHook(iClient, SDKHook_TraceAttack, TraceAttack);
}
public Action TraceAttack(int iVictim, int &iAttacker, int &iInflictor, float &damage, int &damagetype, int &ammotype, int hitbox, int hitgroup)
{
return (iAttacker > 0 && GetClientTeam(iVictim) == GetClientTeam(iAttacker) && damagetype != DMG_BLAST) ? Plugin_Stop:Plugin_Continue;
}
#include <sourcemod>
#include <profiler>
#include <sdktools>
#include <csgo_colors>
public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon)
{
if ((buttons & IN_LEFT) || (buttons & IN_RIGHT))
{
if(IsClientInGame(client) && !IsFakeClient(client) && IsPlayerAlive(client))
{
ForcePlayerSuicide(client);
CGOPrintToChat(client, "{GRAY}[{LIGHTBLUE}CONSOLE{GRAY}]{LIGHTRED} Запрещено использовать {RED}+left +right. {LIGHTRED}Играйте честно!");
}
}
return Plugin_Continue;
}
#include <sourcemod>
#include <sdktools>
#include <csgo_colors>
public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon)
{
if ((buttons & IN_LEFT) || (buttons & IN_RIGHT))
{
if(IsClientInGame(client) && !IsFakeClient(client) && IsPlayerAlive(client) && GetClientTeam(client) == 3)
{
ForcePlayerSuicide(client);
CGOPrintToChat(client, "{GRAY}[{LIGHTBLUE}CONSOLE{GRAY}]{LIGHTRED} Запрещено использовать {RED}+left +right. {LIGHTRED}Играйте честно!");
}
}
return Plugin_Continue;
}
public void OnClientPostAdminCheck(int iClient)
{
SDKHook(iClient, SDKHook_TraceAttack, TraceAttack);
}
public Action TraceAttack(int iVictim, int &iAttacker, int &iInflictor, float &damage, int &damagetype, int &ammotype, int hitbox, int hitgroup)
{
return iAttacker > 0 && iAttacker <= MaxClients && damagetype != DMG_BLAST && GetClientTeam(iVictim) == GetClientTeam(iAttacker) ? Plugin_Handled : Plugin_Continue;
}
#include <sdktools_hooks>
#include <sdktools_functions>
#include <csgo_colors>
public void OnPlayerRunCmdPost(int client, int buttons)
{
if(buttons & (IN_LEFT|IN_RIGHT) && !IsFakeClient(client) && IsPlayerAlive(client) && GetClientTeam(client) == 3)
{
ForcePlayerSuicide(client);
CGOPrintToChat(client, "{GRAY}[{LIGHTBLUE}CONSOLE{GRAY}]{LIGHTRED} Запрещено использовать {RED}+left +right{LIGHTRED}. Играйте честно!");
}
}
Пффф, запросто. Клиент шлёт иногда пинги во время коннекта (например, когда файлы загружает, чтобы сервер не отключал его), от которых срабатывает OnPlayerRunCmd()...как можно отловить нажатия игрока, который ещё не подключился? :biggrin:
Размер всё равно никак не влияет на работоспособность.Ну и уменьшил количество инклюдов (так скомпиленный плагин меньше получится)