Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
- Ошибка
-
Ошибки нету компилиться без ошибок.
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5221
- Билд
-
ReHLDS version: 3.4.0.664-dev
- ReGamedll
-
ReGameDLL version: 5.7.0.313-dev
- Версия Metamod
-
Metamod-r v1.3.0.128, API
- Список метамодулей
-
[ 1] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5221 ini Start 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] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 5] Revoice RUN - revoice_mm_i386.so v0.1.0.32 ini Start Never
[ 6] MySQL RUN - mysql_amxx_i386.so v1.9.0.5221 pl1 ANY ANY
[ 7] ReAPI RUN - reapi_amxx_i386.so v5.6.0.158-dev pl1 ANY Never
[ 8] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl1 ANY Never
[ 9] Fun RUN - fun_amxx_i386.so v1.9.0.5221 pl1 ANY ANY
[10] Engine RUN - engine_amxx_i386.so v1.9.0.5221 pl1 ANY ANY
[11] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5221 pl1 ANY ANY
[12] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5221 pl1 ANY ANY
[13] CSX RUN - csx_amxx_i386.so v1.9.0.5221 pl1 ANY ANY
[14] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5221 pl1 ANY ANY
- Список плагинов
-
[ 1] AMXBans Core 6.13 YamiKaitou amxbans_core.am ru nning
[ 2] AMXBans Main 6.13 YamiKaitou amxbans_main.am de bug
[ 3] Admin Commands 1.9.0.5221 AMXX Dev Team admincmd.amxx ru nning
[ 4] Admin Help 1.9.0.5221 AMXX Dev Team adminhelp.amxx ru nning
[ 5] Slots Reservation 1.2 pUzzlik admin_slots.amx ru nning
[ 6] Menus Front-End 1.9.0.5221 AMXX Dev Team menufront.amxx ru nning
[ 7] Commands Menu 1.9.0.5221 AMXX Dev Team cmdmenu.amxx ru nning
[ 8] Players Menu 1.9.0.5221 AMXX Dev Team plmenu.amxx ru nning
[ 9] Maps Menu 1.9.0.5221 AMXX Dev Team mapsmenu.amxx ru nning
[ 10] Plugin Menu 1.9.0.5221 AMXX Dev Team pluginmenu.amxx ru nning
[ 11] Admin Chat 1.9.0.5221 AMXX Dev Team adminchat.amxx ru nning
[ 12] Lite Translit 2.8 neygomon lite_translit_c de bug
[ 13] Anti Flood 1.9.0.5221 AMXX Dev Team antiflood.amxx ru nning
[ 14] Admin Votes 1.9.0.5221 AMXX Dev Team adminvote.amxx ru nning
[ 15] Pause Plugins 1.9.0.5221 AMXX Dev Team pausecfg.amxx ru nning
[ 16] Stats Configuration 1.9.0.5221 AMXX Dev Team statscfg.amxx ru nning
[ 17] Restrict Weapons 1.9.0.5221 AMXX Dev Team restmenu.amxx ru nning
[ 18] CSStatsX SQL 0.7.4 serfreeman1337 csstatsx_sql.am ru nning
[ 19] AES: StatsX 0.5 Vega serfreeman1337 aes_statsx_cstr ru nning
[ 20] StatsX 1.9.0.5221 AMXX Dev Team statsx.amxx ru nning
[ 21] Top Awards 1.0 neygomon top_awards.amxx ru nning
[ 22] [ReAPI] Admin Models 0.0.2 Vaqtincha reapi_adminvipm ru nning
[ 23] Smoke: HealthNade 0.0.3 wopox1337 smkhlndvip.amxx ru nning
[ 24] [ReAPI]No Team Flash 1.0 ReHLDS Team notmflashvip.am ru nning
[ 25] molodejj_damager 1.1 sector damagervip.amxx ru nning
[ 26] [ReAPI] AimEspFix VIP 1.0 ? fix_vip_tab.amx ru nning
[ 27] Masofke.eu Signed Scre 1.0 ThE_ChOSeN_OnE msfk_snapshot.a ru nning
[ 28] Show Motd 0.1 unnamed motdpriv.amxx ru nning
[ 29] Map Manager 2.5.61 Mistrick mapmanager.amxx ru nning
[ 30] Map Manager: Sub Plugi 0.1 Mistrick mapmanager_subp ru nning
[ 31] AFK Control 1.4.1 [Rnd neygomon afk_control.amx ru nning
[ 32] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a ru nning
[ 33] Knife warmup 0.1 Subb98 knife_warmup.am de bug
[ 34] Auto Demo Recorder 2.2.1 F@nt0M demo_recorder.a ru nning
[ 35] Radio Hudmsg Block 1.0 AcE radiohudmsgbloc ru nning
[ 36] Adverts 1.0 pUzzlik adverts_message ru nning
[ 37] Dead Messages 2.0 maFFyoZZyk dead.amxx de bug
[ 38] Real Damage [ReApi] 2.0 Leo_[BH] real_damage.amx ru nning
[ 39] unknown unknown unknown ShowChangerName ru nning
[ 40] [ReAPI] AWPoff 1.4.3 PAffAEJIkA :3 awp_off.amxx st opped
[ 41] [ReAPI] AdminFreeLook 1.0 ReHLDS Team adminfreelook.a ru nning
[ 42] Rat Bomb 1.0 Seroff mfsc4mdl.amxx ru nning
[ 43] C4 Timer 0.1 Lightman bombtimer.amxx st opped
[ 44] resetscore(ReAPI) 1.0 Phantom resetscore.amxx ru nning
[ 45] Killer ScreenFade 0.0.5 Vaqtincha reapi_killer_sc ru nning
[ 46] unknown unknown unknown mg_sound.amxx ru nning
[ 47] AFK Bomb Transfer 0.4 VEN afkbombtransfer ru nning
[ 48] Best Player 0.2b Subb98 best_player.amx ru nning
[ 49] [ReVIP] System Core 2.5 free pUzzlik re_vip_core.amx ru nning
[ 50] [ReVIP] Menu 2.5 free pUzzlik re_vip_menu.amx ru nning
[ 51] [ReVIP] Connected Info 2.5 free pUzzlik re_vip_connect_ ru nning
[ 52] [ReVIP] Tab Info 2.5 free pUzzlik re_vip_tab_info ru nning
[ 53] [ReVIP] Add HP 2.5 free pUzzlik re_vip_hp_add.a st opped
[ 54] Advanced Experience Sy 0.5 Vega serfreeman1337 aes_main.amxx ru nning
[ 55] AES: CStrike Addon 0.5 Vega serfreeman1337 aes_exp_cstrike ru
- Автор плагина
- Subb98
- Версия плагина
- 0.1
- Исходный код
-
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <hamsandwich>
//#include <roundcontrol> // раскомментируйте эту строку, если на сервере не используется Regamedll_CS
#pragma semicolon 1
#define bit_set(%0,%1) (%1 |= (1<<%0))
#define bit_clear(%0,%1) (%1 &= ~(1<<%0))
#define bit_valid(%0,%1) (%1 & (1<<%0))
#define USE_PAUSE // раскомментируйте эту строку, если желаете, чтобы плагин прекратил работу после выполнения задачи
#if AMXX_VERSION_NUM < 183
const MAX_PLAYERS = 30; // максимальное кол-во игроков на сервере, заменить своим (по умолчанию 32)
#endif
const WARMUP_TIME = 70; // кол-во времени в секундах, отведённое на разминку (по умолчанию 90)
const Float:RESPAWN_DELAY = 0.75; // кол-во времени в секундах, отведённое на задержку перед респауном (по умолчанию 0.75)
const Float:SHOW_MSG_DELAY = 0.8; // кол-во времени в секундах, отведённое на задержку перед отправкой HUD-сообщения (по умолчанию 0.5)
const Float:WARMUP_HEALTH = 65.0; // кол-во ед. здоровья, устанавливаемое игроку при спауне во время разминки (по умолчанию 35.0)
const HW_CROSS_AMMO_WPNLIST = (1<<0);
const HW_TIMER = (1<<4);
const HW_MONEY = (1<<5);
new const szSound[][] = {
"wrsnz/wrmzs1.wav", "wrsnz/wrmzs2.wav", "wrsnz/wrmzs3.wav"
};
enum {
WS_WAITING = 1,
WS_BEGIN,
WS_IN_PROGRESS,
WS_ENDED
}
new HamHook:g_pHamSpawn, HamHook:g_pHamAddPlayerItem, HamHook:g_pHamGiveAmmo, HamHook:g_pHamUse, HamHook:g_pHamKilled;
#if defined _roundcontrol_included
new RoundControlHook:g_pCheckWinHook;
#else
new g_pRoundInfinite, g_szRoundInfinite[10];
#endif
new g_pRestartRound, g_pHideWeaponMsgId, g_pStatusIconMsgId, g_pHudSyncObj1, g_pHudSyncObj2, g_pThinkEnt, g_iConnectedBitsum, g_iAliveBitsum, g_iMessageBitsum, g_iFrags[MAX_PLAYERS + 1],
g_iWarmupState = WS_WAITING, g_pHideWeapon, g_iTimerCount;
public plugin_precache() {
for(new i; i < sizeof szSound; i++) {
precache_sound(szSound[i]);
}
}
public plugin_init() {
register_plugin("Knife warmup", "0.1", "Subb98");
register_clcmd("joinclass", "CmdJoinClass");
const JOIN_CLASS_MENU_KEYS = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5;
register_menucmd(register_menuid("Terrorist_Select"), JOIN_CLASS_MENU_KEYS, "CmdJoinClass");
register_menucmd(register_menuid("CT_Select"), JOIN_CLASS_MENU_KEYS, "CmdJoinClass");
register_event("HLTV", "EventHLTV", "a", "1=0", "2=0");
register_logevent("EventGameCommencing", 2, "1=Game_Commencing");
register_logevent("EventRoundStart", 2, "1=Round_Start");
register_logevent("EventRoundEnd", 2, "1=Round_End");
new const ENT_CLASSNAME[] = "player";
DisableHamForward(g_pHamSpawn = RegisterHam(Ham_Spawn, ENT_CLASSNAME, "HamSpawnPlayerPost", 1));
DisableHamForward(g_pHamAddPlayerItem = RegisterHam(Ham_AddPlayerItem, ENT_CLASSNAME, "HamAddPlayerItemPre"));
DisableHamForward(g_pHamGiveAmmo = RegisterHam(Ham_GiveAmmo, ENT_CLASSNAME, "HamGiveAmmoPre"));
DisableHamForward(g_pHamUse = RegisterHam(Ham_Use, "hostage_entity", "HamUseHostagePre"));
DisableHamForward(g_pHamKilled = RegisterHam(Ham_Killed, ENT_CLASSNAME, "HamKilledPlayerPost", 1));
#if !defined _roundcontrol_included
g_pRoundInfinite = get_cvar_pointer("mp_round_infinite");
#endif
g_pRestartRound = get_cvar_pointer("sv_restartround");
g_pHideWeaponMsgId = get_user_msgid("HideWeapon");
g_pStatusIconMsgId = get_user_msgid("StatusIcon");
g_pHudSyncObj1 = CreateHudSyncObj();
g_pHudSyncObj2 = CreateHudSyncObj();
CreateThinkEntity();
}
#if !defined _roundcontrol_included
public plugin_cfg() {
if(g_pRoundInfinite) {
get_pcvar_string(g_pRoundInfinite, g_szRoundInfinite, charsmax(g_szRoundInfinite));
}
}
#endif
public client_putinserver(id) {
ResetValues(id);
if(!is_user_bot(id) && !is_user_hltv(id)) {
bit_set(id, g_iConnectedBitsum);
}
}
public client_disconnected(id) {
ResetValues(id);
remove_task(id);
}
public CmdJoinClass(const id) {
if(g_iWarmupState == WS_IN_PROGRESS) {
set_task(RESPAWN_DELAY, "TaskRespawn", id);
}
}
public EventHLTV() {
switch(g_iWarmupState) {
case WS_BEGIN: {
g_iWarmupState = WS_IN_PROGRESS;
g_iMessageBitsum = 0;
EnableHamForward(g_pHamSpawn);
EnableHamForward(g_pHamAddPlayerItem);
EnableHamForward(g_pHamGiveAmmo);
EnableHamForward(g_pHamUse);
EnableHamForward(g_pHamKilled);
server_cmd("sv_gravity 350");
g_pHideWeapon = register_message(g_pHideWeaponMsgId, "MessageHideWeapon");
#if defined _roundcontrol_included
g_pCheckWinHook = SetBlockControl(RC_CheckWinConditions);
#else
if(g_pRoundInfinite) {
set_pcvar_num(g_pRoundInfinite, 1);
}
#endif
set_msg_block(g_pStatusIconMsgId, BLOCK_SET);
}
case WS_ENDED: {
entity_set_float(g_pThinkEnt, EV_FL_nextthink, get_gametime() + SHOW_MSG_DELAY);
}
}
}
public EventGameCommencing() {
if(g_iWarmupState == WS_WAITING) {
g_iWarmupState = WS_BEGIN;
}
}
public EventRoundStart() {
if(g_iWarmupState == WS_IN_PROGRESS) {
entity_set_float(g_pThinkEnt, EV_FL_nextthink, get_gametime() + 1.0);
}
}
public EventRoundEnd() {
if(g_iWarmupState == WS_IN_PROGRESS) {
g_iWarmupState = WS_ENDED;
DisableHamForward(g_pHamSpawn);
DisableHamForward(g_pHamAddPlayerItem);
DisableHamForward(g_pHamGiveAmmo);
DisableHamForward(g_pHamUse);
DisableHamForward(g_pHamKilled);
server_cmd("sv_gravity 850");
client_cmd(0, "spk sound/%s", szSound[random_num(0, sizeof szSound)]);
unregister_message(g_pHideWeaponMsgId, g_pHideWeapon);
#if defined _roundcontrol_included
RemoveBlockControl(RC_CheckWinConditions, g_pCheckWinHook);
#else
if(g_pRoundInfinite) {
set_pcvar_string(g_pRoundInfinite, g_szRoundInfinite);
}
#endif
set_msg_block(g_pStatusIconMsgId, BLOCK_NOT);
set_pcvar_float(g_pRestartRound, 1.0);
}
}
public MessageHideWeapon() {
const ARG_FLAGS = 1;
set_msg_arg_int(ARG_FLAGS, ARG_BYTE, get_msg_arg_int(ARG_FLAGS) | HW_CROSS_AMMO_WPNLIST | HW_TIMER | HW_MONEY);
}
public HamSpawnPlayerPost(const id) {
if(is_user_alive(id)) {
bit_set(id, g_iAliveBitsum);
if(!bit_valid(id, g_iMessageBitsum)) {
set_task(SHOW_MSG_DELAY, "TaskWarmupStartMsg", id);
}
entity_set_float(id, EV_FL_health, WARMUP_HEALTH);
engclient_cmd(id, "weapon_knife");
message_begin(MSG_ONE, g_pHideWeaponMsgId, _, id);
write_byte(HW_CROSS_AMMO_WPNLIST | HW_TIMER | HW_MONEY);
message_end();
}
}
public HamAddPlayerItemPre(const id, const pEnt) {
if(cs_get_weapon_id(pEnt) != CSW_KNIFE) {
entity_set_int(pEnt, EV_INT_flags, entity_get_int(pEnt, EV_INT_flags ) | FL_KILLME);
SetHamReturnInteger(0);
return HAM_SUPERCEDE;
}
return HAM_IGNORED;
}
public HamGiveAmmoPre() {
const NO_AMMO_STOP_PROCESSING = -1;
SetHamReturnInteger(NO_AMMO_STOP_PROCESSING);
return HAM_SUPERCEDE;
}
public HamUseHostagePre() {
return HAM_SUPERCEDE;
}
public HamKilledPlayerPost(const id, const pKiller) {
bit_clear(id, g_iAliveBitsum);
set_task(RESPAWN_DELAY, "TaskRespawn", id);
}
public FwdThink(const pEnt) {
switch(g_iWarmupState) {
case WS_IN_PROGRESS: {
static iDiff, iMin;
iDiff = WARMUP_TIME - g_iTimerCount++, iMin = 0;
GetMinutes(iDiff, iMin);
set_hudmessage(124, 252, 0, _, 0.96, _, _, 1.0, 0.0, 0.01, -1);
ShowSyncHudMsg(0, g_pHudSyncObj1, "Iki warmup pabaigos: %d:%d", iMin, iDiff);
if(iDiff || iMin) {
entity_set_float(pEnt, EV_FL_nextthink, get_gametime() + 1.0);
} else {
EventRoundEnd();
}
}
case WS_ENDED: {
g_iWarmupState = WS_WAITING;
g_iTimerCount = 0;
set_hudmessage(0, 139, 139, _, 0.25, _, _, 5.0, _, _, -1);
ShowSyncHudMsg(0, g_pHudSyncObj2, "Žaidimas prasideda - [GLHF] !");
#if defined USE_PAUSE
pause("d");
#endif
}
}
}
public TaskRespawn(const id) {
if(bit_valid(id, g_iConnectedBitsum) && !bit_valid(id, g_iAliveBitsum) && cs_get_user_team(id) != CS_TEAM_SPECTATOR) {
ExecuteHamB(Ham_CS_RoundRespawn, id);
}
}
public TaskWarmupStartMsg(const id) {
if(bit_valid(id, g_iAliveBitsum)) {
set_hudmessage(124, 252, 0, _, 0.25, _, _, 5.0, _, _, -1);
ShowSyncHudMsg(id, g_pHudSyncObj2, "Pasiruošk!^n[WARMUP] - Prasideda!");
bit_set(id, g_iMessageBitsum);
}
}
CreateThinkEntity() {
new const ENT_CLASSNAME[] = "_warmup_think_ent";
if((g_pThinkEnt = create_entity("info_target"))) {
entity_set_string(g_pThinkEnt, EV_SZ_classname, ENT_CLASSNAME);
register_think(ENT_CLASSNAME, "FwdThink");
} else {
set_fail_state("Failed to create think entity");
}
}
ResetValues(const id) {
bit_clear(id, g_iConnectedBitsum);
bit_clear(id, g_iAliveBitsum);
bit_clear(id, g_iMessageBitsum);
g_iFrags[id] = 0;
}
GetMinutes(&iSec, &iMin) {
const SECONDS_IN_MINUTE = 60;
iMin = iSec / SECONDS_IN_MINUTE, iSec %= SECONDS_IN_MINUTE;
}
Hey , Друзья памогите поправить плагин )) Коротко о проблеме ( В общем во время разминки все на ножах но если заходит новый игрок то при респавне он может взять оружие или поднять надо исправить это , и ещё во время разминки пропадает радар и прицел иногда только прицел :/
В этой теме было размещено решение! Перейти к решению.