Участник
Пользователь
- Сообщения
- 702
- Реакции
- 54
- Ошибка
-
1. Боты меняют ники в конце раунда на твой + бота, хотя должно только экранировать.
2. Почему-то при взятии бота, если у него была бомба, то она исчезает и теперь бомбы даже на радаре нет!
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5263 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Oct 27 2019 16:23:31
Built from: https://github.com/alliedmodders/amxmodx/commit/15a14a0
Build ID: 5263:15a14a0
Core mode: JIT+ASM32
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.7.0.693-dev
Build date: 18:20:58 Jan 28 2020 (2117)
Build from: https://github.com/dreamstalker/rehlds/commit/c4cecf5
- ReGamedll
-
ReGameDLL version: 5.15.0.457-dev
Build date: 02:17:41 Mar 27 2020
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/73f5d6d
- Версия Metamod
-
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC4 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.0.135 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5263 ini Start ANY
[ 5] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 6] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 7] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 8] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 9] MySQL RUN - mysql_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
[10] ReAPI RUN - reapi_amxx_i386.so v5.12.0.192-dev pl4 ANY Never
[11] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl4 ANY Never
[12] AuthEmu RUN - authemu_amxx_i386.so v4.2.12.311-dev+m pl4 ANY Never
[13] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
[14] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
[15] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
[16] Fun RUN - fun_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
[17] Engine RUN - engine_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
17 plugins, 17 running
- Список метамодулей
-
Currently loaded modules:
name version author status
[ 1] MySQL 1.9.0.5263 AMX Mod X Dev Team running
[ 2] dummy_csx 1.0 AGHL.RU Dev Team running
[ 3] ReAPI 5.12.0.192 Asmodai & s1lent running
[ 4] ReAimDetector 0.2.2 ReHLDS Team running
[ 5] AuthEmu 4.2.12.311 Dev-MS.ru running
[ 6] FakeMeta 1.9.0.5263 AMX Mod X Dev Team running
[ 7] CStrike 1.9.0.5263 AMX Mod X Dev Team running
[ 8] Ham Sandwich 1.9.0.5263 AMX Mod X Dev Team running
[ 9] Fun 1.9.0.5263 AMX Mod X Dev Team running
[10] Engine 1.9.0.5263 AMX Mod X Dev Team running
[11] RegEx 1.9.0.5263 AMX Mod X Dev Team running
11 modules, 11 correct
- Список плагинов
-
Currently loaded plugins:
name version author file status
[ 1] AuthEmu API 1.0 Dev-MS Team authemu.amxx running
[ 2] Lite Bans 2.2 neygomon lite_bans_off.a running
[ 3] Admin Load 3.10.1-alp F@nt0M adminload.amxx running
[ 4] ScreenMaker 1.1 neygomon screen_maker.am running
[ 5] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 6] Advanced Gag 1.9.0 neygomon amx_gag.amxx running
[ 7] [ReAPI] AdminFreeLook 1.0 ReHLDS Team adminfreelook.a running
[ 8] ReChecker Logging 1.0 custom rc_logging.amxx running
[ 9] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am debug
[ 10] Admin Commands 1.9.0.5263 AMXX Dev Team admincmd.amxx running
[ 11] Slots Reservation 1.9.0.5263 AMXX Dev Team adminslots.amxx running
[ 12] Multi-Lingual System 1.9.0.5263 AMXX Dev Team multilingual.am running
[ 13] Menus Front-End 1.4 neugomon menufront_end.a running
[ 14] Commands Menu 1.9.0.5263 AMXX Dev Team cmdmenu.amxx running
[ 15] Players Menu 1.9.0.5263 AMXX Dev Team plmenu.amxx running
[ 16] Maps Menu 1.4.1 neugomon mapsmenu.amxx running
[ 17] Admin Chat 1.9.0.5263 AMXX Dev Team adminchat.amxx running
[ 18] Admin Votes 1.9.0.5263 AMXX Dev Team adminvote.amxx running
[ 19] NextMap 1.9.0.5263 AMXX Dev Team nextmap.amxx running
[ 20] Nextmap Chooser 1.9.0.5263 AMXX Dev Team mapchooser.amxx running
[ 21] TimeLeft 1.9.0.5263 AMXX Dev Team timeleft.amxx running
[ 22] Pause Plugins 1.9.0.5263 AMXX Dev Team pausecfg.amxx running
[ 23] Stats Configuration 1.9.0.5263 AMXX Dev Team statscfg.amxx running
[ 24] AES: StatsX 0.5+1 serfreeman1337 aes_statsx_cstr running
[ 25] Restrict Weapons 1.9.0.5263 AMXX Dev Team restmenu.amxx running
[ 26] StatsX 1.9.0.5263 AMXX Dev Team statsx.amxx running
[ 27] CS Stats Logging 1.9.0.5263 AMXX Dev Team stats_logging.a running
[ 28] Advert Messages 1.2.2 neygomon adverts.amxx running
[ 29] [ReAPI] Advanced Team 0.1.0 Vaqtincha AdvancedTeamCho running
[ 30] Bad Nickname 0.0.1 Jumper valve-ms-boost. running
[ 31] Lite Recoder 1.0.1 neygomon amx_demorec.amx running
[ 32] [ReAPI] Reset Score 0.1 pUzzlik re_reset_score. running
[ 33] Mode 2x2 2.5re s1lent mode.amxx running
[ 34] say /help 1.0 ThePhoenix say_help.amxx running
[ 35] Spawn Tutor 1.0 fl0wer tutor.amxx running
[ 36] Chat Manager 1.1.2-16 Mistrick chatmanager.amx running
[ 37] Chat Manager: Addon 0.0.4-70 Mistrick chatmanager_add running
[ 38] CSDM Auto Balance 1.0 xPaw csdm_auto_balan debug
[ 39] Bot Features 0.0.3fix2 Vaqtincha BotFeatures.amx running
[ 40] AFK Control ReNew 1.2(a) neygomon afk_control.amx running
[ 41] Game Description Advan 1.0 fl0wer gamedesc_advanc running
[ 42] Team Balance Control 1.3.9 gyxoBka TeamBalanceCont debug
[ 43] Advanced Experience Sy 0.5 Vega serfreeman1337 aes_main.amxx running
[ 44] AES: CStrike Addon 0.5 Vega serfreeman1337 aes_exp_cstrike running
[ 45] AES: Informer 0.5 Vega serfreeman1337 aes_informer.am running
[ 46] Battle Mod 1.4 MakapoH. bm_main.amxx debug
[ 47] Battle Mod: Levels 1.3 MakapoH. bm_levels.amxx debug
[ 48] Battle Mod: Classes 1.5-dev MakapoH. bm_classes.amxx debug
[ 49] unknown unknown unknown bm_improvments. debug
[ 50] unknown unknown unknown bm_sql.amxx debug
[ 51] Smoke: HealthNade 0.0.4b wopox1337 Smoke_HealthNad debug
[ 52] [ReAPI] Bow 0.1.4 F@nt0M reapi_bow.amxx debug
[ 53] Class: Death 1.2 MakapoH. bm_class_death. debug
[ 54] Class: Spy 1.2 MakapoH. bm_class_spy.am debug
[ 55] Class: Monk 1.2 MakapoH. bm_class_monk.a debug
[ 56] Class: Archer 1.2 MakapoH. bm_class_archer debug
[ 57] Class: Destroyer 1.2 MakapoH. bm_class_destro debug
[ 58] Class: Dragon 1.2 MakapoH. bm_class_dragon debug
[ 59] Skills 1.7 lite fl0wer bm_skills.amxx debug
[ 60] Shop 1.3 fl0wer bm_shop.amxx debug
[ 61] Battle Menu 1.2 ThePhoenix bm_help.amxx debug
[ 62] Show enemies on radar 0.1b Denzer show_enemies_on running
62 plugins, 62 running
- Автор плагина
- Vaqtincha
- Версия плагина
- 0.0.3fix2
- Исходный код
-
// Copyright © 2017 Vaqtincha
// Fix смены ников новых игроков на ники Ботов+Взятых Ботов от juice (2019)
// по заказу от SNauPeRа
// Fix2 проверка на взятие VIP-бота на as_ карте от AlexandrFiner (2020)
// по заказу от SNauPeRа
/**■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG START ■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
#define BACK_ITEMS_ON_RESTARTROUND // Вернуть боту оружия и предметов при новом раунде
#define INFO_HUD_POSITION -1.0, 0.60 // Позиция худ информера
#define INFO_HUD_COLOR 25, 200, 20 // Цвет худ информера
#define KILL_REWARD 200 // Сколько давать деньги игроку за килл
//#define KILL_FRAGS 1 // Сколько давать фраги игроку за килл
#define MAX_USE_PER_ROUND 1 // Сколько раз можно использовать бота за раунд
// #define PL_DEBUG // Включить отладочную информацию
/**■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG END ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <reapi>
#define PL_VERSION "0.0.3fix2"
#if AMXX_VERSION_NUM < 183
#define client_disconnected client_disconnect
#include <colorchat>
#endif
#define IsPlayer(%1) (1 <= %1 <= g_iMaxPlayers)
#define IsBot(%1) (g_aPlayerData[%1][szBotName][0])
#define SET_ORIGIN(%1,%2) engfunc(EngFunc_SetOrigin, %1, %2)
#define SET_SIZE(%1,%2,%3) engfunc(EngFunc_SetSize, %1, %2, %3)
#define VECTOR_ZERO Float:{0.0, 0.0, 0.0}
const MAX_NAME_LENGHT = 32
const INVALID_WEAPONS_BS = ((1 << any:WEAPON_NONE)|(1 << any:WEAPON_GLOCK)|(1 << any:WEAPON_KNIFE))
const USEFUL_WEAPON_SLOTS_BS = ((1 << any:PRIMARY_WEAPON_SLOT)|(1 << any:PISTOL_SLOT)/* |(1 << any:GRENADE_SLOT) */)
const ALLOWED_OBS_MODE_BS = ((1 << OBS_IN_EYE)|(1 << OBS_CHASE_FREE))
enum coord_e { Float:X, Float:Y, Float:Z }
enum { SpecHealth2_Health = 1, SpecHealth2_Target }
enum player_s
{
pBotIndex, // last bot index
szBotName[32],
iUsedCount
}
new g_aPlayerData[MAX_CLIENTS + 1][player_s]
new bool:g_bMapHasBombTarget, bool:g_bRoundEnded, g_iMaxPlayers, g_iHudSync
new HookChain:g_hGetPlayerSpawnSpot, HamHook:g_hUseWeaponStrip
new const g_szBotChatMsg[][] = {
"Смотри и не подведи меня!",
"Надеюсь ты не зря убил меня",
"Думаешь играешь лучше чем я ? Посмотрим..",
"Б*я человечки не дают играть",
"Решил играть за меня ? Только береги мое оружие.",
"Во блин. Так несправедливо",
"Зарабатывай деньги и фраги. Я БУДУ РАД."
}
new const g_szDefModelNames[MODEL_AUTO][] = {
"", "urban", "terror", "leet", "arctic", "gsg9",
"gign", "sas", "guerilla", "vip", "militia", "spetsnaz"
}
public plugin_init()
{
register_plugin("Bot Features", PL_VERSION, "Vaqtincha")
if(!cvar_exists("bot_zombie"))
{
pause("ad")
return
}
register_clcmd("nightvision", "ClCmd_ControlBot")
register_clcmd("rr", "ClCmd_ControlBot")
register_event("SpecHealth2", "Event_SpecHealth2", "bd", "1>0" /*, "2!0" */)
RegisterHookChain(RG_RoundEnd, "RoundEnd", .post = true)
RegisterHookChain(RG_CSGameRules_RestartRound, "CSGameRules_RestartRound", .post = false)
RegisterHookChain(RG_CSGameRules_PlayerKilled, "CSGameRules_PlayerKilled", .post = false)
DisableHookChain(g_hGetPlayerSpawnSpot = RegisterHookChain(RG_CSGameRules_GetPlayerSpawnSpot, "CSGameRules_GetPlayerSpawnSpot", .post = false))
if(rg_find_ent_by_class(NULLENT, "player_weaponstrip", true) > 0) {
DisableHamForward(g_hUseWeaponStrip = RegisterHam(Ham_Use, "player_weaponstrip", "CStripWeapons_Use", .Post = false))
}
g_bMapHasBombTarget = bool:get_member_game(m_bMapHasBombTarget)
g_iMaxPlayers = get_maxplayers()
g_iHudSync = CreateHudSyncObj()
register_forward(FM_ClientDisconnect, "OnClientDisconnect_Post", 1)
}
public OnClientDisconnect_Post(pClient)
{
set_entvar(pClient, var_netname, "^0")
}
public client_putinserver(pClient)
{
g_aPlayerData[pClient][szBotName][0] = g_aPlayerData[pClient][iUsedCount] = g_aPlayerData[pClient][pBotIndex] = 0
if(is_user_bot(pClient)) {
get_user_name(pClient, g_aPlayerData[pClient][szBotName], MAX_NAME_LENGHT - 1)
}
}
public client_disconnected(pClient)
{
new pBot
if(IsBot(pClient))
{
new aPlayers[32], iCount, pPlayer
get_players(aPlayers, iCount, "ch") // skip bot's & hltv
for(--iCount; iCount >= 0; iCount--)
{
pPlayer = aPlayers[iCount]
if(g_aPlayerData[pPlayer][pBotIndex] == pClient) {
FullResetPlayer(pPlayer)
}
}
}
else if((pBot = g_aPlayerData[pClient][pBotIndex]) > 0) {
SetBotName(pBot, g_aPlayerData[pBot][szBotName])
}
g_aPlayerData[pClient][iUsedCount] = g_aPlayerData[pClient][pBotIndex] = 0
}
public ClCmd_ControlBot(const pPlayer)
{
if(is_user_alive(pPlayer))
return PLUGIN_CONTINUE
new pBot = get_entvar(pPlayer, var_iuser2)
if(pBot <= 0 || pBot == pPlayer || !IsBot(pBot) || !is_user_alive(pBot))
return PLUGIN_HANDLED
if(!(ALLOWED_OBS_MODE_BS & (1 << get_entvar(pPlayer, var_iuser1))))
return PLUGIN_HANDLED
new TeamName:iTeam = get_member(pPlayer, m_iTeam)
if(!(TEAM_TERRORIST <= iTeam <= TEAM_CT))
{
client_print(pPlayer, print_center, "Спектаторы идите в... :D")
return PLUGIN_HANDLED
}
if(get_member(pBot, m_bIsVIP)) {
client_print(pPlayer, print_center, "Нельзя брать VIP бота")
return PLUGIN_HANDLED
}
#if !defined PL_DEBUG // ignore the team on debug mode (not recommended!)
if(iTeam != get_member(pBot, m_iTeam))
{
client_print(pPlayer, print_center, "Играть можно только за тиммейтов!")
return PLUGIN_HANDLED
}
#endif
#if defined MAX_USE_PER_ROUND
if(MAX_USE_PER_ROUND > 0 && g_aPlayerData[pPlayer][iUsedCount] >= MAX_USE_PER_ROUND)
{
client_print(pPlayer, print_center, "Можно использовать %i раз за раунд!", MAX_USE_PER_ROUND)
return PLUGIN_HANDLED
}
#endif
if(g_bRoundEnded) // (get_member_game(m_bRoundTerminating) || get_member_game(m_bCompleteReset))
{
client_print(pPlayer, print_center, "Раунд уже окончен!")
return PLUGIN_HANDLED
}
rg_set_user_model(pPlayer, g_szDefModelNames[get_member(pBot, m_iModelName)], true)
#if defined PL_DEBUG
set_member(pPlayer, m_iTeam, get_member(pBot, m_iTeam))
#endif
set_user_info(pPlayer, "*bot", "1") // lol
g_aPlayerData[pPlayer][pBotIndex] = pBot
g_aPlayerData[pPlayer][iUsedCount]++
set_member(pPlayer, m_bNotKilled, true) // HACK: ignore default items
if(g_hUseWeaponStrip > any:0) { // map has weapon stipper ?
EnableHamForward(g_hUseWeaponStrip)
}
EnableHookChain(g_hGetPlayerSpawnSpot)
rg_round_respawn(pPlayer)
ScenarioIcon(pPlayer)
new szName[MAX_NAME_LENGHT], szFakeName[MAX_NAME_LENGHT]
get_user_name(pPlayer, szName, charsmax(szName))
PrintChatAll(pPlayer, szName, g_aPlayerData[pBot][szBotName])
formatex(szFakeName, charsmax(szFakeName), "[%s] %s", szName, g_aPlayerData[pBot][szBotName])
SetBotName(pBot, szFakeName)
client_print_color(pPlayer, print_team_default, "^3%s ^1: %s", g_aPlayerData[pBot][szBotName], g_szBotChatMsg[random(sizeof(g_szBotChatMsg))])
return PLUGIN_HANDLED
}
public Event_SpecHealth2(const pPlayer)
{
new pTarget = read_data(SpecHealth2_Target)
if(pTarget > 0 && IsBot(pTarget) && (ALLOWED_OBS_MODE_BS & (1 << get_entvar(pPlayer, var_iuser1)))
&& get_member(pPlayer, m_iTeam) == get_member(pTarget, m_iTeam))
{
set_hudmessage(INFO_HUD_COLOR, INFO_HUD_POSITION, .holdtime = 1.5, .fadeintime = 0.5, .fadeouttime = 0.5)
// ShowSyncHudMsg(pPlayer, g_iHudSync, "Бот: %s | Здаровие: %i ^nНажмите ^"N^" чтобы управлять ботом", g_aPlayerData[pTarget][szBotName], read_data(SpecHealth2_Health))
ShowSyncHudMsg(pPlayer, g_iHudSync, "Нажмите ^"N^" чтобы управлять ботом: %s", g_aPlayerData[pTarget][szBotName])
}
else {
ClearSyncHud(pPlayer, g_iHudSync)
}
}
public CStripWeapons_Use(const pStripEntity, const pActivator, const pCaller, const useType, const Float:value)
{
DisableHamForward(g_hUseWeaponStrip)
return (IsPlayer(pActivator) && g_aPlayerData[pActivator][pBotIndex] > 0) ? HAM_SUPERCEDE : HAM_IGNORED
}
public RoundEnd(const WinStatus:status, const ScenarioEventEndRound:event, const Float:tmDelay) {
g_bRoundEnded = true
}
public CSGameRules_RestartRound()
{
new aPlayers[32], iCount, pPlayer, pBot, bool:bRestart = bool:get_member_game(m_bCompleteReset)
get_players(aPlayers, iCount, "ch") // skip bot's & hltv
g_bRoundEnded = false
for(--iCount; iCount >= 0; iCount--)
{
pPlayer = aPlayers[iCount]
if(!bRestart && (pBot = g_aPlayerData[pPlayer][pBotIndex]) > 0)
{
if(!is_nullent(pBot))
{
#if defined BACK_ITEMS_ON_RESTARTROUND
// player has a useful weapon ?
if(TransferItems(pPlayer, pBot, true) & USEFUL_WEAPON_SLOTS_BS) {
set_member(pBot, m_bNotKilled, true) // HACK: ignore default items
}
#endif
SetBotName(pBot, g_aPlayerData[pBot][szBotName])
}
#if defined BACK_ITEMS_ON_RESTARTROUND
set_member(pPlayer, m_bNotKilled, false) // HACK: give default items
#endif
}
if(g_aPlayerData[pPlayer][iUsedCount] > 0) {
FullResetPlayer(pPlayer)
}
}
}
public CSGameRules_PlayerKilled(const pVictim, const pevKiller, const pevInflictor)
{
new pKillerBot, pVictimBot
if((pVictimBot = g_aPlayerData[pVictim][pBotIndex]) > 0)
{
set_user_info(pVictim, "*bot", "0")
SetBotName(pVictimBot, g_aPlayerData[pVictimBot][szBotName])
g_aPlayerData[pVictim][pBotIndex] = 0
}
if(pVictim == pevKiller)
return HC_CONTINUE
if(pVictimBot > 0) {
SetHookChainArg(1, ATYPE_INTEGER, pVictimBot)
}
if(IsPlayer(pevKiller) && (pKillerBot = g_aPlayerData[pevKiller][pBotIndex]) > 0)
{
SetHookChainArg(2, ATYPE_INTEGER, pKillerBot)
if(pevKiller == pevInflictor) {
SetHookChainArg(3, ATYPE_INTEGER, get_member(pevKiller, m_pActiveItem))
}
#if defined KILL_REWARD
rg_add_account(pevKiller, KILL_REWARD)
#endif
#if defined KILL_FRAGS
ExecuteHam(Ham_AddPoints, pevKiller, KILL_FRAGS, false)
#endif
}
return HC_CONTINUE
}
public CSGameRules_GetPlayerSpawnSpot(const pPlayer)
{
DisableHookChain(g_hGetPlayerSpawnSpot)
new pBot = g_aPlayerData[pPlayer][pBotIndex]
if(pBot > 0 && !is_nullent(pBot))
{
new Float:vecOrigin[coord_e], Float:vecVAngles[coord_e], Float:vecMins[coord_e], Float:vecMaxs[coord_e]
get_entvar(pBot, var_origin, vecOrigin)
get_entvar(pBot, var_v_angle, vecVAngles) // note: v_angle
get_entvar(pBot, var_mins, vecMins)
get_entvar(pBot, var_maxs, vecMaxs)
TransferItems(pBot, pPlayer)
KillBot(pBot, vecOrigin)
if(SetPlayerPosition(pPlayer, vecOrigin, vecVAngles, vecMins, vecMaxs, (get_entvar(pBot, var_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN))
{
SetHookChainReturn(ATYPE_INTEGER, pPlayer)
return HC_SUPERCEDE
}
}
return HC_CONTINUE
}
TransferItems(const pPlayer, const pReceiver, bool:bBackToBot = false)
{
if(!bBackToBot) {
set_entvar(pReceiver, var_health, Float:get_entvar(pPlayer, var_health))
}
new bitWeaponSlots, ArmorType:iArmortype, iArmorVal
if((iArmorVal = rg_get_user_armor(pPlayer, iArmortype)) > 0 && iArmortype != ARMOR_NONE) {
rg_set_user_armor(pReceiver, iArmorVal, iArmortype)
}
if(get_member(pPlayer, m_bHasNightVision)) {
set_member(pReceiver, m_bHasNightVision, true)
}
// if(get_member(pPlayer, m_fLongJump)) {
// set_member(pReceiver, m_fLongJump, true)
// }
if(g_bMapHasBombTarget)
{
if(!bBackToBot && get_member(pPlayer, m_bHasC4)) {
rg_transfer_c4(pPlayer, pReceiver)
}
if(get_member(pPlayer, m_bHasDefuser))
{
rg_give_defusekit(pReceiver)
rg_remove_item(pPlayer, "item_thighpack")
}
}
new pActiveItem = get_member(pPlayer, m_pActiveItem)
for(new WeaponIdType:iId, iBpAmmo, pItem, pNextItem, Float:flReleaseThrow,
InventorySlotType:iSlot = PRIMARY_WEAPON_SLOT; iSlot <= GRENADE_SLOT; iSlot++
)
{
pItem = get_member(pPlayer, m_rgpPlayerItems, iSlot)
while(pItem > 0 && !is_nullent(pItem))
{
pNextItem = get_member(pItem, m_pNext)
if(iSlot == GRENADE_SLOT && pActiveItem == pItem)
{
flReleaseThrow = Float:get_member(pActiveItem, m_flReleaseThrow)
if(flReleaseThrow == 0.0) // ready to launch nade (get_entvar(pPlayer, var_button) & IN_ATTACK)
{
ExecuteHam(Ham_Item_Holster, pActiveItem, 1) // reset: m_flStartThrow & m_flReleaseThrow
set_entvar(pPlayer, var_button, get_entvar(pPlayer, var_button) &~ IN_ATTACK) // old ReGameDLL support
}
else if(flReleaseThrow > 0.0) // grenade throwed
{
ExecuteHam(Ham_Weapon_RetireWeapon, pActiveItem) // force switch to best weapon
pActiveItem = get_member(pPlayer, m_pActiveItem) // update active weapon
pItem = pNextItem
continue // skip it
}
}
if(iSlot != KNIFE_SLOT && !(INVALID_WEAPONS_BS & (1 << any:(iId = get_member(pItem, m_iId))))) {
iBpAmmo = rg_get_user_bpammo(pPlayer, iId)
}
if(!ExecuteHam(Ham_RemovePlayerItem, pPlayer, pItem)) // Removes an item to the player inventory (is failed ?).
{
pItem = pNextItem
continue
}
if(!ExecuteHam(Ham_AddPlayerItem, pReceiver, pItem)) // Add a weapon to the player inventory (is failed ?).
{
pItem = pNextItem
continue
}
ExecuteHam(Ham_Item_AttachToPlayer, pItem, pReceiver)
if(iBpAmmo > 0) {
rg_set_user_bpammo(pReceiver, iId, iBpAmmo)
}
bitWeaponSlots |= (1 << any:iSlot)
pItem = pNextItem
}
}
if(pActiveItem > 0 && !is_nullent(pActiveItem))
{
rg_switch_weapon(pReceiver, pActiveItem)
if(get_member(pPlayer, m_bOwnsShield))
{
rg_give_shield(pReceiver)
if(!IsBot(pReceiver) && get_member(pPlayer, m_bShieldDrawn)) { // get_member(pActiveItem, m_Weapon_iWeaponState) & WPNSTATE_SHIELD_DRAWN
ExecuteHam(Ham_Weapon_SecondaryAttack, pActiveItem)
}
rg_remove_item(pPlayer, "weapon_shield")
}
}
return bitWeaponSlots
}
bool:SetPlayerPosition(const pPlayer, Float:vecOrigin[coord_e], Float:vecAngles[coord_e], Float:vecMins[coord_e], Float:vecMaxs[coord_e], const iHullNumber)
{
static const Float:vecMove[][coord_e] = { { 1.0, 1.0, 0.0 }, { 1.0, -1.0, 0.0 }, { -1.0, -1.0, 0.0 }, { -1.0, 1.0, 0.0 } }
new i
do
{
if(IsFreeSpace(vecOrigin, iHullNumber))
{
if(iHullNumber == HULL_HEAD)
{
set_entvar(pPlayer, var_flags, get_entvar(pPlayer, var_flags) | FL_DUCKING)
set_entvar(pPlayer, var_button, get_entvar(pPlayer, var_button) | IN_DUCK)
}
SET_SIZE(pPlayer, vecMins, vecMaxs)
SET_ORIGIN(pPlayer, vecOrigin)
set_entvar(pPlayer, var_velocity, VECTOR_ZERO)
// set_entvar(pPlayer, var_basevelocity, VECTOR_ZERO)
set_entvar(pPlayer, var_v_angle, VECTOR_ZERO)
set_entvar(pPlayer, var_angles, vecAngles)
set_entvar(pPlayer, var_punchangle, VECTOR_ZERO)
set_entvar(pPlayer, var_fixangle, 1) // const FORCE_VIEW_ANGLES = 1
return true
}
else
{
vecOrigin[X] = (vecOrigin[X] - vecMins[X] * vecMove[i][X])
vecOrigin[Y] = (vecOrigin[Y] - vecMins[Y] * vecMove[i][Y])
i++
}
// server_print("Attemps: %i", i)
} while (i < sizeof(vecMove))
return false
}
KillBot(const pBot, Float:vecOrigin[coord_e])
{
set_member(pBot, m_vBlastVector, vecOrigin) // FIX: "PM Got a NaN velocity"
set_member(pBot, m_bKilledByBomb, true) // HACK: block sending "DeathMsg" & frag loses
set_entvar(pBot, var_effects, EF_NODRAW) // hide corpse
// SET_ORIGIN(pBot, VECTOR_ZERO) // FIX: panic bot's
dllfunc(DLLFunc_ClientKill, pBot)
}
FullResetPlayer(const pPlayer)
{
set_user_info(pPlayer, "*bot", "0")
rg_reset_user_model(pPlayer, true)
g_aPlayerData[pPlayer][pBotIndex] = g_aPlayerData[pPlayer][iUsedCount] = 0
}
PrintChatAll(const pPlayer, const szName[], const szNameBot[])
{
new aPlayers[32], iCount, pReceiver
get_players(aPlayers, iCount, "ch") // skip bot's & hltv
for(--iCount; iCount >= 0; iCount--)
{
pReceiver = aPlayers[iCount]
if(pPlayer != pReceiver) {
client_print_color(pReceiver, pPlayer, "^4* ^1Игрок ^3%s ^1занял место бота ^3%s", szName, szNameBot)
}
}
}
SetBotName(const pBot, const szName[])
{
if(szName[0])
{
set_user_info(pBot, "name", szName)
set_entvar(pBot, var_netname, szName)
}
}
// checks if a space is vacant, by VEN
stock bool:IsFreeSpace(Float:vecOrigin[coord_e], const iHullNumber, const pSkipEnt = 0)
{
const pTR = 0 // Global traceresult handle
engfunc(EngFunc_TraceHull, vecOrigin, vecOrigin, DONT_IGNORE_MONSTERS, iHullNumber, pSkipEnt, pTR)
return bool:(!get_tr2(pTR, TR_StartSolid) && !get_tr2(pTR, TR_AllSolid) && get_tr2(pTR, TR_InOpen))
}
stock ScenarioIcon(const pPlayer, const iStatus = 1)
{
static iMsgIdScenario
if(iMsgIdScenario > 0 || (iMsgIdScenario = get_user_msgid("Scenario")))
{
message_begin(MSG_ONE_UNRELIABLE, iMsgIdScenario, .player = pPlayer)
write_byte(iStatus)
write_string("hostage1")
write_byte(150)
message_end()
}
}
(SNAC в самый верх вроде надо переместить, я забыл просто)
В этой теме было размещено решение! Перейти к решению.