Участник
Пользователь
- Сообщения
- 103
- Реакции
- 9
- Ошибка
-
L 03/06/2021 - 12:02:06: [CSTRIKE] Invalid weapon id 3
L 03/06/2021 - 12:02:06: [AMXX] Displaying debug trace (plugin "Mode_Flying_Scoutsman.amxx", version "0.0.1")
L 03/06/2021 - 12:02:06: [AMXX] Run time error 10: native error (native "cs_set_user_bpammo")
L 03/06/2021 - 12:02:06: [AMXX] [0] Mode_Flying_Scoutsman.sma::set_user_weapons (line 126)
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5271 (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: Jun 24 2020 13:53:30
Built from: https://github.com/alliedmodders/amxmodx/commit/5eea3e5
Build ID: 5271:5eea3e5
Core mode: JIT+ASM32
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.8.0.711-dev
Build date: 13:13:38 Feb 6 2021 (2492)
Build from: https://github.com/dreamstalker/rehlds/commit/722e19d
- ReGamedll
-
ReGameDLL version: 5.20.0.492-dev
Build date: 15:26:35 Jan 4 2021
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/aae507c
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
- Список метамодулей
-
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.0.92 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC5 ini ANY ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5271 ini Start ANY
[ 6] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5271 pl5 ANY ANY
[ 7] Fun RUN - fun_amxx_i386.so v1.9.0.5271 pl5 ANY ANY
[ 8] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5271 pl5 ANY ANY
[ 9] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5271 pl5 ANY ANY
9 plugins, 9 running
- Список плагинов
-
Currently loaded plugins:
name version author file status
[ 1] Lite MapChooser 2.6 neygomon mapchooser.amxx running
[ 2] Admin Base 1.9.0.5271 AMXX Dev Team admin.amxx running
[ 3] Admin Commands 1.9.0.5271 AMXX Dev Team admincmd.amxx running
[ 4] Maps Menu 1.9.0.5271 AMXX Dev Team mapsmenu.amxx running
[ 5] Admin Votes 1.9.0.5271 AMXX Dev Team adminvote.amxx running
[ 6] Mode: Flying Scoutsman 0.0.1 wopox1337@Dev-CS Mode_Flying_Sco debug
6 plugins, 6 running
- Автор плагина
- [email protected]
- Версия плагина
- 0.0.1
- Исходный код
-
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
enum {
XO_WEAPON = 4,
m_pPlayer = 41,
m_iFOV = 363,
m_flAccuracy = 62,
m_flLastFire = 63,
m_iId = 43,
#if !defined MAX_CLIENTS
MAX_CLIENTS = 32,
#endif
random_seed = 96
}
new bool: g_bModeEnabled;
new Float:g_vecVelocity[MAX_CLIENTS + 1][3];
enum any: H_TYPES_s {
_PrimaryAttack_Pre,
_PrimaryAttack_Post,
_CBasePlayer_Spawn,
_CBaseEntity_Touch
}
new any: Hooks[H_TYPES_s];
new const CLASS_WEAPON[] = "weapon_scout";
new const CLASS_ArouryEntity[] = "armoury_entity";
public plugin_init() {
register_plugin("Mode: Flying Scoutsman", "0.0.1", "[email protected]");
Hooks[_PrimaryAttack_Pre] = RegisterHam(Ham_Weapon_PrimaryAttack, CLASS_WEAPON, "CBasePlayerWeapon_PrimAttack", .Post = false);
Hooks[_PrimaryAttack_Post] = RegisterHam(Ham_Weapon_PrimaryAttack, CLASS_WEAPON, "CBasePlayerWeapon_PrimAttackP", .Post = true);
Hooks[_CBasePlayer_Spawn] = RegisterHam(Ham_Spawn, "player", "CBasePlayer_Spawn", .Post = true, .specialbot = true);
Hooks[_CBaseEntity_Touch] = RegisterHam(Ham_Touch, CLASS_ArouryEntity, "CBaseEntity_Touch", .Post = false, .specialbot = true);
#if defined HIDE_ARMORYENTS
register_event("HLTV", "event_NewRound", "a", "1=0", "2=0");
#endif
new pCvar = create_cvar(
.name = "mp_gamemode_Flying_Scoutsman",
.string = "1",
.flags = FCVAR_PROTECTED,
.description = "Toggle Flying Scoutsman mode.",
.has_min = true,
.min_val = 0.0,
.has_max = true,
.max_val = 1.0
);
hook_cvar_change(pCvar, "hookCvar_ModeChange");
bind_pcvar_num(pCvar, g_bModeEnabled);
Toggle_Mode(g_bModeEnabled);
}
public hookCvar_ModeChange(pCvar) {
Toggle_Mode(g_bModeEnabled);
// log_amx("== [Mode %s]", g_bModeEnabled ? "enabled" : "disabled");
}
new g_szCvars_Enabled[][] = {
"sv_gravity 200",
"mp_startmoney 0",
"mp_buytime 0",
"sv_restart 1"
}
new g_szCvars_Disabled[][] = {
"sv_gravity 800",
"mp_startmoney 800",
"mp_buytime 0.25",
"sv_restart 1"
}
Toggle_Mode(iStatus) {
switch(iStatus){
case true: {
for(new i; i < H_TYPES_s; i++) {
if(Hooks[i])
EnableHamForward(Hooks[i]);
}
ExecCMDS(g_szCvars_Enabled, sizeof g_szCvars_Enabled);
}
case false: {
for(new i; i < H_TYPES_s; i++) {
if(Hooks[i])
DisableHamForward(Hooks[i]);
}
ExecCMDS(g_szCvars_Disabled, sizeof g_szCvars_Disabled);
}
}
}
enum any: tasks ( +=12 ) { TASK_SetWeapons = 1337 }
public CBasePlayer_Spawn(pPlayerId) {
if(is_user_connected(pPlayerId))
set_task(0.2, "set_user_weapons", .id = TASK_SetWeapons + pPlayerId);
}
public set_user_weapons(pPlayerId) {
pPlayerId -= TASK_SetWeapons;
if(!is_user_connected(pPlayerId))
return;
strip_user_weapons(pPlayerId);
give_item(pPlayerId, "weapon_scout");
cs_set_user_bpammo(pPlayerId, CSW_SCOUT, 90);
give_item(pPlayerId, "weapon_knife");
}
stock ExecCMDS(szBuffer[][], const iLen) {
for(new i; i < iLen; i++)
server_cmd(szBuffer[i]);
}
public CBasePlayerWeapon_PrimAttackP(pWeapon)
{
if(pWeapon <= 0)
return;
new pPlayer = get_pdata_cbase(pWeapon, m_pPlayer, XO_WEAPON);
if(pPlayer > 0)
{
if(g_vecVelocity[pPlayer][0] && g_vecVelocity[pPlayer][0] && g_vecVelocity[pPlayer][0])
{
set_pev(pPlayer, pev_velocity, g_vecVelocity[pPlayer]);
set_pev(pPlayer, pev_fov, float(get_pdata_int(pPlayer, m_iFOV)));
set_pev(pPlayer, pev_flags, pev(pPlayer, pev_flags) & ~FL_ONGROUND);
g_vecVelocity[pPlayer][0] = g_vecVelocity[pPlayer][0] = g_vecVelocity[pPlayer][0] = 0.0;
}
}
}
public CBasePlayerWeapon_PrimAttack(const pWeapon)
{
if(pWeapon <= 0)
return;
new pPlayer = get_pdata_cbase(pWeapon, m_pPlayer, XO_WEAPON);
if(pPlayer > 0)
{
set_pdata_int(pPlayer, random_seed, 0);
set_pdata_float(pWeapon, m_flLastFire, 0.0, XO_WEAPON);
set_pdata_float(pWeapon, m_flAccuracy, 1.0, XO_WEAPON);
pev(pPlayer, pev_velocity, g_vecVelocity[pPlayer]);
set_pev(pPlayer, pev_velocity, Float:{0.0, 0.0, 0.0});
set_pev(pPlayer, pev_fov, 40.0);
set_pev(pPlayer, pev_flags, pev(pPlayer, pev_flags) | FL_ONGROUND);
}
}
public CBaseEntity_Touch(pWeaponEnt, pPlayerId)
return HAM_SUPERCEDE;
#if defined HIDE_ARMORYENTS
enum ArmouryEnts_States ( +=1 ) { HIDE, SHOW }
public event_NewRound() {
if(g_bModeEnabled){
Hide_Armoury_Entity();
}
}
stock Hide_Armoury_Entity()
{
new pEnt = -1;
while((pEnt = fm_find_ent_by_class(pEnt, CLASS_ArouryEntity)))
Hide_ArmouryEntities(pEnt);
}
stock Hide_ArmouryEntities(pEnt)
{
if(!pev_valid(pEnt))
return;
static fOrigin[3];
pev(pEnt, pev_origin, fOrigin);
fOrigin[1] -= 2000.0;
set_pev(pEnt, pev_origin, fOrigin);
}
#endif
Плагин работает корректно, кроме двух нюансов, которые я смог найти, возможно их больше.
1. Нет 100% точности при движении.
2. Если включена "mapchangecfgfile server.cfg", то гравитация будет сбрасываться на ту, что в настройках сервера прописана. Хотелось бы это решить тоже, но по возможности.
Ресурс: [0.0.1] Flying Scoutsman
1. Нет 100% точности при движении.
2. Если включена "mapchangecfgfile server.cfg", то гравитация будет сбрасываться на ту, что в настройках сервера прописана. Хотелось бы это решить тоже, но по возможности.
Ресурс: [0.0.1] Flying Scoutsman
Вложения
-
4.8 KB Просмотры: 186