Участник
Пользователь
- Сообщения
- 164
- Реакции
- 13
- Помог
- 2 раз(а)
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
Основная информация
Проблема: Nice Player Bonus. error
Ошибка:
Amx Mod X: 1.8.2
Билд:
ReGamedll:
Список модулей:
Список плагинов:
Список метамодулей:
Исходник:
Комментарий:
Приветствую .. нужна помощь .. поставил данный плагин все норм работает .. / но потом вышла такая ошибка
далее прописал debug теперь такая ошибка.. .
нужен скриптер.. чтобы исправить эту ошибку.. ,исходник скинул .. помогите пожалуйста..
Проблема: Nice Player Bonus. error
Ошибка:
Дополнительная информацияпосле debug/выходит ошибка
Amx Mod X: 1.8.2
Билд:
Код:
ReHLDS version: 3.0.0.566-dev
ReGamedll:
Код:
ReGameDLL version: 5.2.0.196-dev
Список модулей:
PHP:
[ 1] MySQL 1.8.2 AMX Mod X Dev Team running
[ 2] CStrike 1.8.2 AMX Mod X Dev Team running
[ 3] CSX 1.8.2 AMX Mod X Dev Team running
[ 4] hackdetector 0.15.328.l AGHL.RU Dev Team running
[ 5] Hide Cvars 1.0 Eriurias running
[ 6] FakeMeta 1.8.2 AMX Mod X Dev Team running
[ 7] Ham Sandwich 1.8.2 AMX Mod X Dev Team running
[ 8] ReAimDetector 0.1.6 ReHLDS Team running
[ 9] Fun 1.8.2 AMX Mod X Dev Team running
[10] Engine 1.8.2 AMX Mod X Dev Team running
[11] Sockets 1.8.2 HLSW Dev Team running
[12] Sockets2 1.8.1.3746 HLSW Dev Team running
[13] RegEx 1.8.2 AMX Mod X Dev Team running
13 modules, 13 correct
Список плагинов:
HTML:
[ 1] Night MapList
[ 2] Admin Loader
[ 3] FreshBans
[ 4] DopBan
[ 5] Aliases checker
[ 6] ReAimDetector API
[ 7] Super WeaponMenu
[ 8] Army Ranks Ultimate
[ 9] AR Vampire
[ 10] Weapon Model + Sound R 1.2 GHW_Chronic
[ 11] Ultimate Gag
[ 12] Ultimate Models
[ 13] VIP RBS
[ 14] Top Award RBS
[ 15] Night VIPs
[ 16] Auto Restart vl
[ 17] Advert Messages
[ 18] Players Menu
[ 19] Admin Chat
[ 20] Admin Commands
[ 21] Commands Menu
[ 22] Info. Messages
[ 23] Menus Front-End
[ 24] Plugin Menu
[ 25] Restrict Weapons
[ 26] Maps Menu
[ 27] Advanced MapChooser
[ 28] Night DeathMatch
[ 29] CS Stats Logging
[ 30] CsStats MySQL
[ 31] Stats Configuration
[ 32] StatsX RBS
[ 33] [AMX] Stat Sounds
[ 34] Parachute New
[ 35] Afk Control
[ 36] AutoDemo
[ 37] AWP limitter
[ 38] Ping Control
[ 39] Ping Faker
[ 40] Reset Score (c) Leo_[B
[ 41] Server Menu [INI]
[ 42] Rock to Ban
[ 43] AntiFlash FINAL
[ 44] SS Menu
[ 45] [AMX] Get Dhud
[ 46] [AMX] Kill Knife & Rnd
[ 47] Map Spawns Editor
[ 48] unknown
[ 49] AC Spectator ESP
[ 50] Block All Adverts
[ 51] Chat Checker
[ 52] Lite Translit
[ 53] Block 'Fire in the hol
Список метамодулей:
PHP:
[ 1] AMX Mod X RUN - amxmodx.so v1.8.2 ini Start ANY
[ 2] Reunion RUN - reunion.so v0.1.75 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 4] WHBlocker RUN - whblocker.so v1.5.690 ini ANY
[ 5] Rechecker RUN - rechecker.so v2.3 ini ANY
[ 6] Revoice RUN - revoice.so v0.1.26 ini Start Never
[ 7] ReSemiclip RUN - semiclip.so v2.2(a) ini ANY
[ 8] MySQL RUN - mysql_amxx_i386. v1.8.2 pl1 ANY
[ 9] CStrike RUN - cstrike_amxx_i38 v1.8.2 pl1 ANY
[10] CSX RUN - csx_amxx_i386.so v1.8.2 pl1 ANY
[11] hackdetector RUN - hackdetector_amx v0.15.32 pl1 ANY
[12] Hide Cvars RUN - hidecvars_amxx_i v1.0 pl1 ANY
[13] FakeMeta RUN - fakemeta_amxx_i3 v1.8.2 pl1 ANY
[14] Ham Sandwich RUN - hamsandwich_amxx v1.8.2 pl1 ANY
[15] ReAimDetector RUN - reaimdetector_am v0.1.6 pl1 ANY Never
[16] Fun RUN - fun_amxx_i386.so v1.8.2 pl1 ANY
[17] Engine RUN - engine_amxx_i386 v1.8.2 pl1 ANY
Исходник:
Код:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <fakemeta_util>
#define is_user_valid(%0) (%0 && %0 <= g_iMaxPlayers)
const PRIMARY_WEAPONS_BIT_SUM =
(1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<
CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90);
const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE);
enum _:WEAPON_DATA_SIZE
{
sz_DataName[32],
sz_DataItem[24],
i_Index,
i_DataAmmo
};
new g_szWeaponData[][WEAPON_DATA_SIZE] =
{
{"AK47", "weapon_ak47", CSW_AK47, 120},
{"M4A1", "weapon_m4a1", CSW_M4A1, 120},
{"AWP", "weapon_awp", CSW_AWP, 70},
{"M249", "weapon_m249", CSW_M249, 250},
{"DEAGLE", "weapon_deagle", CSW_DEAGLE, 56}
};
new g_iBestPlayer, g_szBestPlayerName[32], Float:g_fDamage[33];
new g_iRoundCounter, g_iRandomPrice, g_pCvarRoundAccess, g_pCvarMinPlayers, g_iMaxPlayers;
public plugin_init()
{
#define VERSION "1.7"
register_plugin("BEST PLAYER PRIVATE", VERSION, "DUKKHAZ0R");
register_cvar("nice_player_bonus", VERSION, FCVAR_SERVER | FCVAR_SPONLY);
RegisterHam(Ham_Spawn, "player", "fw_HamSpawn_Post", true);
RegisterHam(Ham_TakeDamage, "player", "fw_HamTakeDamage_Pre", false);
register_logevent("eEndRound", 2, "1=Round_End");
register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_w");
register_event("HLTV", "eRoundStart", "a", "1=0", "2=0");
register_menucmd(register_menuid("BonusMenu"), MENU_KEY_4|MENU_KEY_6, "MenuHandler");
g_pCvarRoundAccess = register_cvar("bp_round_access", "3");
g_pCvarMinPlayers = register_cvar("bp_minplayers", "5");
g_iMaxPlayers = get_maxplayers();
new szMapName[32], szMapPrefix[][] = {"aim_", "fy_", "awp_", "35hp_", "$"};
get_mapname(szMapName, charsmax(szMapName));
for(new i; i < sizeof szMapPrefix; i++) {
if(containi(szMapName, szMapPrefix) != -1) {
pause("ad");
break;
}
}
}
public client_disconnect(id)
g_fDamage[id] = 0.0;
public client_connect(id)
g_fDamage[id] = 0.0;
public fw_HamTakeDamage_Pre(pVictim, iInflictor, pAttacker, Float:fDamage, damagebits)
{
if((is_user_valid(pVictim) && is_user_valid(pAttacker)) && (get_pdata_int(pVictim, 114) != get_pdata_int(pAttacker, 114)) && (pAttacker != pVictim))
g_fDamage[pAttacker] += fDamage;
}
public eRestart()
g_iRoundCounter = 0;
public eRoundStart()
{
static i, apPlayers[32], iPlayers, pPlayer;
get_players(apPlayers, iPlayers, "ch");
for(i = 0; i < iPlayers; i++)
{
pPlayer = apPlayers;
g_fDamage[pPlayer] = 0.0;
}
}
public eEndRound()
{
if(++g_iRoundCounter < get_pcvar_num(g_pCvarRoundAccess) || get_playersnum() < get_pcvar_num(g_pCvarMinPlayers))
return;
static i, apPlayers[32], iPlayers, pPlayer, Float:fBestPlayerDamage;
get_players(apPlayers, iPlayers, "ch");
fBestPlayerDamage = 0.0;
for(i = 0; i < iPlayers; i++)
{
pPlayer = apPlayers;
if(g_fDamage[pPlayer] && g_fDamage[pPlayer] > fBestPlayerDamage)
{
g_iBestPlayer = pPlayer;
fBestPlayerDamage = g_fDamage[pPlayer];
}
}
if(g_iBestPlayer)
{
get_user_name(g_iBestPlayer, g_szBestPlayerName, charsmax(g_szBestPlayerName));
ChatColor(0, "^1[^4Бонус^1] Отлично! Лучший результат за прошлый раунд: <<^4%s^1>> [^3%d урона^1]", g_szBestPlayerName, floatround(g_fDamage[g_iBestPlayer]));
}
}
public fw_HamSpawn_Post(const id)
{
if(is_user_alive(id) && g_iBestPlayer == id)
ShowBonusMenu(id);
}
public ShowBonusMenu(const id)
{
static iLen, szMenu[512]; g_iRandomPrice = random(7);
switch(g_iRandomPrice)
{
case 7: iLen = formatex(szMenu, charsmax(szMenu), "\wВаш приз: \rАрмор + все гранаты^n\dВзять свой приз?^n^n");
default: iLen = formatex(szMenu, charsmax(szMenu), "\wВаш приз: \r%s^n\dВзять свой приз?^n^n", g_szWeaponData[g_iRandomPrice][sz_DataName]);
}
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r4.\wПолучить приз^n");
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r6.\wОтказаться от приза^n^n");
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r0.\wВыход");
show_menu(id, MENU_KEY_4|MENU_KEY_6, szMenu, -1, "BonusMenu");
}
public MenuHandler(const id, const iKey)
{
switch(iKey)
{
case 3:
{
switch(g_iRandomPrice)
{
case 7:
{
ChatColor(0, "^1[^4Бонус^1] Поздравляем! <<^3%s^1>> выиграл ^4армор + все гранаты^1 за лучший результ.", g_szBestPlayerName);
equipment_player(id);
return;
}
case 6: drop_weapons(id, 2);
default: drop_weapons(id, 1);
}
fm_give_item(id, g_szWeaponData[g_iRandomPrice][sz_DataItem]);
fm_set_user_bpammo(id, g_szWeaponData[g_iRandomPrice][i_Index], g_szWeaponData[g_iRandomPrice][i_DataAmmo]);
ChatColor(0, "^1[^4Бонус^1] Поздравляем! <<^4%s^1>> выиграл ^4%s^1 за лучший результ.", g_szBestPlayerName, g_szWeaponData[g_iRandomPrice][sz_DataName]);
}
case 5: ChatColor(0, "^1[^4Бонус^1] Странно, что ^4%s^1 отказался от приза.", g_szBestPlayerName );
}
g_iBestPlayer = 0;
}
stock equipment_player(const id)
{
fm_give_item(id, "weapon_hegrenade");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_smokegrenade");
fm_set_user_armor(id, 100);
}
stock drop_weapons(id, dropwhat)
{
static weapons[32], num, i, weaponid;
num = 0;
get_user_weapons(id, weapons, num);
for (i = 0; i < num; i++)
{
weaponid = weapons;
if ((dropwhat == 1 && ((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM)))
{
static wname[32];
get_weaponname(weaponid, wname, sizeof wname - 1);
engclient_cmd(id, "drop", wname);
}
}
}
stock fm_get_user_team(const pPlayer)
{
return get_pdata_int(pPlayer, 114);
}
stock fm_set_user_bpammo(const pPlayer, iWeaponId, iAmount)
{
new iOffset;
switch(iWeaponId)
{
case CSW_AWP: iOffset = 377;
case CSW_SCOUT, CSW_AK47, CSW_G3SG1: iOffset = 378;
case CSW_M249: iOffset = 379;
case CSW_FAMAS, CSW_M4A1, CSW_AUG, CSW_SG550, CSW_GALIL, CSW_SG552: iOffset = 380;
case CSW_M3, CSW_XM1014: iOffset = 381;
case CSW_USP, CSW_UMP45, CSW_MAC10: iOffset = 382;
case CSW_FIVESEVEN, CSW_P90: iOffset = 383;
case CSW_DEAGLE: iOffset = 384;
case CSW_P228: iOffset = 385;
case CSW_GLOCK18, CSW_MP5NAVY, CSW_TMP, CSW_ELITE: iOffset = 386;
case CSW_FLASHBANG: iOffset = 387;
case CSW_HEGRENADE: iOffset = 388;
case CSW_SMOKEGRENADE: iOffset = 389;
case CSW_C4: iOffset = 390;
default: return;
}
set_pdata_int(pPlayer, iOffset, iAmount, 5);
}
stock ChatColor(const id, const input[], any:...)
{
static msg[191], players[32], count; count = 1;
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!g", "^4");
replace_all(msg, 190, "!y", "^1");
replace_all(msg, 190, "!t", "^3");
if (id) players[0] = id; else get_players(players, count, "ch");
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players))
{
message_begin(MSG_ONE_UNRELIABLE, 76, _, players);
write_byte(players);
write_string(msg);
message_end();
}
}
}
}
Комментарий:
Приветствую .. нужна помощь .. поставил данный плагин все норм работает .. / но потом вышла такая ошибка
Код:
L 05/24/2017 - 23:41:24: Start of error session.
L 05/24/2017 - 23:41:24: Info (map "de_nuke") (file "addons/amxmodx/logs/error_20170524.log")
L 05/24/2017 - 23:41:24: [AMXX] Run time error 4 (plugin "nice_player_bonus.amxx") - debug not enabled!
L 05/24/2017 - 23:41:24: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
далее прописал debug теперь такая ошибка.. .
Код:
L 05/25/2017 - 09:47:36: [AMXX] Run time error 4: index out of bounds
L 05/25/2017 - 09:47:36: [AMXX] [0] 85f924043b47b2be71c82cda21592afe.sma::ShowBonusMenu (line 136)
L 05/25/2017 - 09:47:36: [AMXX] [1] 85f924043b47b2be71c82cda21592afe.sma::fw_HamSpawn_Post (line 126)
нужен скриптер.. чтобы исправить эту ошибку.. ,исходник скинул .. помогите пожалуйста..
В этой теме было размещено решение! Перейти к решению.
Вложения
-
7.5 KB Просмотры: 636