- Ошибка
-
L 12/10/2018 - 20:09:52: [FAKEMETA] Invalid entity 9 (no private data)
L 12/10/2018 - 20:09:52: [AMXX] Run time error 10 (plugin "Bets_GameCMS.amxx") (native "get_pdata_int") - debug not enabled!
L 12/10/2018 - 20:09:52: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 12/10/2018 - 20:09:55: [FAKEMETA] Invalid entity 9 (no private data)
L 12/10/2018 - 20:09:55: [AMXX] Run time error 10 (plugin "Bets_GameCMS.amxx") (native "get_pdata_int") - debug not enabled!
L 12/10/2018 - 20:09:55: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5232 (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 14 2018 08:47:55
Built from: https://github.com/alliedmodders/amxmodx/commit/be52641
Build ID: 5232:be52641
Core mode: JIT+ASM32
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 09:47:42 Sep 29 2018 (1631)
Build from: https://github.com/dreamstalker/rehlds/commit/89be216
- ReGamedll
-
ReGameDLL version: 5.7.0.314-dev
Build date: 10:33:17 Oct 5 2018
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/7aeca16
- Версия 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] Reunion RUN - reunion_mm_i386.so v0.1.0.92 ini Start Never
[ 2] Revoice RUN - revoice_mm_i386.so v0.1.0.32 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5232 ini Start ANY
[ 6] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.695 ini Chlvl ANY
[ 8] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 9] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl5 ANY Never
[10] Parachute RUN - parachute_amxx_i386.so v1.3 pl5 ANY ANY
[11] ReAPI RUN - reapi_amxx_i386.so v5.1.0.112-dev pl5 ANY Never
[12] Engine RUN - engine_amxx_i386.so v1.9.0.5232 pl5 ANY ANY
[13] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5232 pl5 ANY ANY
[14] MySQL RUN - mysql_amxx_i386.so v1.9.0.5232 pl5 ANY ANY
[15] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5232 pl5 ANY ANY
[16] CSX RUN - csx_amxx_i386.so v1.9.0.5232 pl5 ANY ANY
[17] Fun RUN - fun_amxx_i386.so v1.9.0.5232 pl5 ANY ANY
[18] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5232 pl5 ANY ANY
18 plugins, 18 running
- Список плагинов
-
Currently loaded plugins:
name version author file status
[ 1] [183] AMXBans RBS 18.10.13 SKAJIbnEJIb & La amxbans_rbs.amx running
[ 2] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 3] GameCMS_API 5.2.9 zhorzh78 gamecms_api_5.2 running
[ 4] [183] AdminCmd RBS 18.09.15 AMXX Dev Team & admincmd_rbs.am running
[ 5] [183] AdminChat RBS 18.10.12 SKAJIbnEJIb adminchat_rbs.a running
[ 6] [183] CsStats MySQL 18.08.09 SKAJIbnEJIb csstats_mysql.a running
[ 7] [183] Army Ranks Ultim 18.05.15 SKAJIbnEJIb army_ranks_ulti running
[ 8] [183] Ultimate Gag 18.02.21BE SKAJIbnEJIb ultimate_gag.am running
[ 9] [183] Chat Controller 18.07.20 SKAJIbnEJIb chat_controller running
[ 10] [183] Chat RBS 18.03.24 SKAJIbnEJIb chat_rbs.amxx running
[ 11] [183] BonusTime RBS 18.10.10 SKAJIbnEJIb bonustime_rbs.a running
[ 12] [183] Skill ELO 18.03.24 SKAJIbnEJIb skill_elo.amxx running
[ 13] [183] Team Blinding 17.10.30 Sanlerus team_blinding.a running
[ 14] [183] AfkKicker RBS 17.10.30 SKAJIbnEJIb afkkicker_rbs.a running
[ 15] Menus Front-End 18.03.24 AMXX Dev Team & amxmodmenu_rbs. running
[ 16] [183] Damager RBS 17.12.22 SKAJIbnEJIb damager_rbs.amx running
[ 17] [183] MapChooser RBS 18.10.05 SKAJIbnEJIb & UF mapchooser_rbs. running
[ 18] [183] PTB RBS 17.10.30 Ptahhotep & SKAJ ptb_rbs.amxx running
[ 19] [183] StatsX RBS 18.03.24 SKAJIbnEJIb & AM statsx_rbs.amxx running
[ 20] [183] VIP RBS 18.03.24 SKAJIbnEJIb vip_rbs.amxx running
[ 21] [183] VoteBan RBS 17.10.30 SKAJIbnEJIb voteban_rbs.amx running
[ 22] [183] BonusMenu RBS 18.05.15 SKAJIbnEJIb bonusmenu_rbs.a running
[ 23] [183] CsStats ResetSco 18.03.24 SKAJIbnEJIb csstats_resetsc running
[ 24] [183] MapsMenu RBS 17.10.30 AMXX Dev Team & mapsmenu_rbs.am running
[ 25] [183] Demo Recorder RB 18.02.08 SKAJIbnEJIb demorecorder_rb running
[ 26] [183] BackWeapons RBS 17.08.11 SKAJIbnEJIb & ho backweapons_rbs running
[ 27] [183] Block Reconnect 17.08.09 ShaTalKiN Block_Reconnect running
[ 28] [183] AR Vampire 17.08.22 SKAJIbnEJIb ar_vampire.amxx running
[ 29] [183] High Ping Kicker 18.05.15 SKAJIbnEJIb hpk_rbs.amxx running
[ 30] [183] SlayLosers RBS 18.10.13 SKAJIbnEJIb & d3 slaylosers_rbs. running
[ 31] [183] Stuck RBS 17.08.11 NL)Ramon(NL & SK stuck_rbs.amxx running
[ 32] [183] VoteRR RBS 17.08.11 kalash1k & SKAJI voterr_rbs.amxx running
[ 33] [183] Parachute RBS 17.12.12 KRoT@L/JTP10181 parachute_rbs.a running
[ 34] Slots Reservation 1.9.0.5232 AMXX Dev Team adminslots.amxx running
[ 35] Multi-Lingual System 1.9.0.5232 AMXX Dev Team multilingual.am running
[ 36] Commands Menu 1.9.0.5232 AMXX Dev Team cmdmenu.amxx running
[ 37] Plugin Menu 1.9.0.5232 AMXX Dev Team pluginmenu.amxx running
[ 38] Scrolling Message 1.9.0.5232 AMXX Dev Team scrollmsg.amxx running
[ 39] Info. Messages 1.9.0.5232 AMXX Dev Team imessage.amxx running
[ 40] [183] TimeLeft 18.09.25 SKAJIbnEJIb & AM timeleft.amxx running
[ 41] Pause Plugins 1.9.0.5232 AMXX Dev Team pausecfg.amxx running
[ 42] Stats Configuration 1.9.0.5232 AMXX Dev Team statscfg.amxx running
[ 43] CS Misc. Stats 1.9.0.5234 AMXX Dev Team miscstats.amxx running
[ 44] Game Change 1.1 Wite game_name.amxx running
[ 45] Advert Messages 1.2.2 neygomon adverts.amxx running
[ 46] [183] AC Spectator ESP 17.08.09 SKAJIbnEJIb & Ko ac_esp.amxx running
[ 47] Nade Health 1.2 medusa NadeHealth.amxx running
[ 48] Mode 2x2 2.5re s1lent mode.amxx running
[ 49] [183] Jobs RBS 18.05.15 SKAJIbnEJIb jobs_rbs.amxx running
[ 50] [183] Snipers RBS 18.05.15 SKAJIbnEJIb snipers_rbs.amx running
[ 51] [183] Ultimate Knife 18.05.15 SKAJIbnEJIb ultimate_knife. running
[ 52] [183] Ultimate Informe 17.10.30 SKAJIbnEJIb ultimate_inform running
[ 53] GameCMS_Achievs_Core 1.1 zhorzh78 gamecms_achievs running
[ 54] GameCMS_Special_Achiev 1.0 zhorzh78 special_achievs running
[ 55] GameCMS_Player_Achievs 1.1 zhorzh78 player_achievs_ running
[ 56] GameCMS_Bomb_Achievs 1.1 zhorzh78 bomb_achievs_1. stopped
[ 57] [GameCMS] Real Money R 1.1 InKay Bets_GameCMS.am running
[ 58] [183] AR Bets 17.10.30 SKAJIbnEJIb ar_bets.amxx running
58 plugins, 57 running
- Автор плагина
- не известен
- Версия плагина
- Bets_GameCMS 1.1
- Исходный код
-
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <gamecms5>
#define TIMEDELAY 15 //Сколько времени будет держатся меню ставок
#define WIN_KOEF 1.5 //Коофицент умножение ставки при победе
#define MIN_PLAYER 1 //Минимальное число игроков, при которой работают ставки
//Значение ставок
new const gBetsNum[] = { 1, 2, 3, }
#define SetBit(%0,%1) ((%0) |= (1 << (%1)))
#define ClearBit(%0,%1) ((%0) &= ~(1 << (%1)))
#define IsSetBit(%0,%1) ((%0) & (1 << (%1)))
#define IsNotSetBit(%0,%1) (~(%0) & (1 << (%1)))
#define InvertBit(%0,%1) ((%0) ^= (1 << (%1)))
#define CS_TEAM_SPECTATOR 3 // 1-terrorist,2-спецназ, 3-спектатор,0-зашедший
new g_iBitUserConnected; // Битовая сумма для аналога is_user_connected
new g_iMaxPlayers
new g_iBetStart
new g_iBetOpponent[ 2 ]
new g_iBetOpponentName[ 2 ][ 32 ]
new g_iBetDelay
new iPlayerBet[ 33 ]
new iPlayerBetTeam[ 33 ]
new Float:fPlayerBetTemp[ 33 ]
public plugin_init()
{
register_plugin("[GameCMS] Real Money Rates","1.1","InKay")
//Регистрация Event событий
register_event("HLTV", "Event_RoundStart", "a", "1=0", "2=0")
//Регистрация Ham событий
RegisterHam(Ham_Killed, "player", "HamKilled_Pre", 0)
//Регистрация менюх
register_menucmd( register_menuid( "Show_BetMenu" ), (1<<0 | 1<<1 | 1<<2 | 1<<3), "Handler_BetMenu")
// Команда вызова
register_clcmd("say /betss","Show_BetMenu")
//Ланг файл
register_dictionary("bets_gamecms.txt")
//Прочее
g_iMaxPlayers = get_maxplayers()
}
/*==========================================
Выход игрока
===========================================*/
public client_putinserver( id )
ClearBit( g_iBitUserConnected, id );
public client_disconnect(id)
{
SetBit( g_iBitUserConnected, id );
g_iBetStart = false
g_iBetDelay = 0
if(g_iBetOpponent[0] == id || g_iBetOpponent[1] == id)
{
for(new i = 1; i <= g_iMaxPlayers; i++)
{
if(fPlayerBetTemp[i])
cmsapi_set_user_money(i, (cmsapi_get_user_money(i) + fPlayerBetTemp[i]))
iPlayerBet[i] = 0
iPlayerBetTeam[i] = 0
fPlayerBetTemp[i] = 0.0
}
}
}
/*==========================================
Отлов старта нового раунда
===========================================*/
public Event_RoundStart()
{
g_iBetStart = false
g_iBetDelay = 0
remove_task(100500)
for(new i = 1; i <= g_iMaxPlayers; i++)
{
if( IsNotSetBit( g_iBitUserConnected, i ) )
continue
iPlayerBet[i] = 0
iPlayerBetTeam[i] = 0
fPlayerBetTemp[i] = 0.0
}
}
/*==========================================
Отлов смерти игрока
===========================================*/
public HamKilled_Pre(iVictim, iAttacker, iCourse)
{
if(g_iBetStart)
{
if(g_iBetOpponent[0] == iVictim)
{
g_iBetStart = false
g_iBetDelay = 0
BetWin(2)
}
else
if(g_iBetOpponent[1] == iVictim)
{
g_iBetStart = false
g_iBetDelay = 0
BetWin(1)
}
return HAM_IGNORED
}
CheckBet(0)
return HAM_IGNORED
}
/*==========================================
Счетчик окончания ставок
===========================================*/
public DelayBetMenu()
{
for(new i = 1; i <= g_iMaxPlayers; i++)
{
if( IsNotSetBit( g_iBitUserConnected, i ) || is_user_alive(i))
continue
if(cs_get_user_team(i) == CS_TEAM_SPECTATOR)
continue
if(!cmsapi_is_user_member(i))
continue
if(g_iBetOpponent[0] == i || g_iBetOpponent[1] == i)
continue
if(iPlayerBetTeam[i])
continue
if(g_iBetDelay <= 0)
show_menu(i, 0, "^n", 1)
else
Show_BetMenu(i)
}
g_iBetDelay -= 1
if(g_iBetDelay <= 0)
{
remove_task(100500)
}
}
/*==========================================
Меню ставок
===========================================*/
public Show_BetMenu(id)
{
if(iPlayerBetTeam[id])
return PLUGIN_HANDLED
new szText[256]
new iLen
iLen += formatex(szText[iLen], charsmax( szText ) - iLen, "%L", LANG_PLAYER, "MB_BETMENU_TITLE", cmsapi_get_user_money(id))
iLen += formatex(szText[iLen], charsmax( szText ) - iLen, "\r1. \w%L", LANG_PLAYER, "MB_BETMENU_ITEMS", g_iBetOpponentName[0])
iLen += formatex(szText[iLen], charsmax( szText ) - iLen, "\r2. \w%L^n", LANG_PLAYER, "MB_BETMENU_ITEMS", g_iBetOpponentName[1])
iLen += formatex(szText[iLen], charsmax( szText ) - iLen, "\r3. \w%L^n^n%s", LANG_PLAYER, "MB_BETMENU_ITEM_3", ConvertBet(1, iPlayerBet[id]), ShowTime())
show_menu(id, (1<<0 | 1<<1 | 1<<2 | 1<<3), szText, -1, "Show_BetMenu")
return PLUGIN_HANDLED
}
/*==========================================
Меню ставок(Обработчик)
===========================================*/
public Handler_BetMenu(id, iKey)
{
new szName[32]
get_user_name(id, szName, charsmax( szName ))
switch( iKey )
{
case 0:
{
new Float:fBet = float(gBetsNum[iPlayerBet[id]]) / 100.0
if(cmsapi_get_user_money(id) < fBet)
{
UTIL_SayText(0, "%L", LANG_PLAYER, "MB_BET_NOMONEY")
Show_BetMenu(id)
return PLUGIN_HANDLED
}
cmsapi_set_user_money(id, (cmsapi_get_user_money(id) - fBet))
fPlayerBetTemp[id] = fBet
iPlayerBetTeam[id] = 1
UTIL_SayText(0, "%L", LANG_PLAYER, "MB_BET_GOOD", szName, ConvertBet(2, iPlayerBet[id]), g_iBetOpponentName[0])
}
case 1:
{
new Float:fBet = float(gBetsNum[iPlayerBet[id]]) / 100.0
if(cmsapi_get_user_money(id) < fBet)
{
UTIL_SayText(0, "%L", LANG_PLAYER, "MB_BET_NOMONEY")
Show_BetMenu(id)
return PLUGIN_HANDLED
}
cmsapi_set_user_money(id, (cmsapi_get_user_money(id) - fBet))
fPlayerBetTemp[id] = fBet
iPlayerBetTeam[id] = 2
UTIL_SayText(0, "%L", LANG_PLAYER, "MB_BET_GOOD", szName, ConvertBet(2, iPlayerBet[id]), g_iBetOpponentName[1])
}
case 2:
{
iPlayerBet[id] += 1
if(iPlayerBet[id] >= sizeof( gBetsNum ))
iPlayerBet[id] = 0
Show_BetMenu(id)
}
}
return PLUGIN_HANDLED
}
/*==========================================
Чекер доступности ставок
===========================================*/
stock CheckBet(iType)
{
if(GetPlayerNum() < MIN_PLAYER)
return false
new iNum[2]
for( new pId = 1; pId <= g_iMaxPlayers; pId++ )
{
if( is_user_alive( pId ) )
{
if( cs_get_user_team( pId ) == 1 )
if( ++iNum[ 0 ] > 1 )
{
g_iBetOpponent[0]=0;
g_iBetOpponent[1]=0;
return false;
}
else g_iBetOpponent[ 0 ] = pId;
if( cs_get_user_team( pId ) == 2 )
if( ++iNum[ 1 ] > 1 )
{
g_iBetOpponent[0]=0;
g_iBetOpponent[1]=0;
return false;
}
else g_iBetOpponent[ 1 ] = pId;
}
}
if(!iType)
{
g_iBetStart = true
get_user_name(g_iBetOpponent[0], g_iBetOpponentName[0], charsmax( g_iBetOpponentName[] ))
get_user_name(g_iBetOpponent[1], g_iBetOpponentName[1], charsmax( g_iBetOpponentName[] ))
g_iBetDelay = TIMEDELAY
set_task(1.0, "DelayBetMenu", 100500, _, _, "b")
}
return true
}
/*==========================================
Чекер победителей, начисление баланса
===========================================*/
stock BetWin(iTeam)
{
for(new i = 1; i <= g_iMaxPlayers; i++)
{
if( IsNotSetBit( g_iBitUserConnected, i ) )
continue
if(iPlayerBetTeam[i] <= 0)
continue
if(iPlayerBetTeam[i] != iTeam)
{
UTIL_SayText(i, "%L", LANG_PLAYER, "MB_BET_LOSE", gBetsNum[iPlayerBet[i]])
iPlayerBet[i] = 0
iPlayerBetTeam[i] = -1
fPlayerBetTemp[i] = 0.0
continue
}
fPlayerBetTemp[i] *= WIN_KOEF
cmsapi_set_user_money(i, (cmsapi_get_user_money(i) + fPlayerBetTemp[i]))
UTIL_SayText(i, "%L", LANG_PLAYER, "MB_BET_WIN", fPlayerBetTemp[i])
iPlayerBet[i] = 0
iPlayerBetTeam[i] = -1
fPlayerBetTemp[i] = 0.0
}
}
/*==========================================
Ковертирование ставки
===========================================*/
stock ConvertBet(iType, iBet)
{
new szTemp[64]
new iTemp[2]
if(gBetsNum[iBet] >= 100)
{
iTemp[0] = gBetsNum[iBet] / 100
iTemp[1] = gBetsNum[iBet] - (iTemp[0] * 100)
if(iTemp[1])
{
if(iType == 1)
formatex(szTemp, charsmax( szTemp ), "%L", LANG_PLAYER, "MB_BETMENU_1_RK", iTemp[0], iTemp[1])
else
formatex(szTemp, charsmax( szTemp ), "%L", LANG_PLAYER, "MB_BETMENU_2_RK", iTemp[0], iTemp[1])
}else{
if(iType == 1)
formatex(szTemp, charsmax( szTemp ), "%L", LANG_PLAYER, "MB_BETMENU_1_R", iTemp[0])
else
formatex(szTemp, charsmax( szTemp ), "%L", LANG_PLAYER, "MB_BETMENU_2_R", iTemp[0])
}
}else{
if(iType == 1)
formatex(szTemp, charsmax( szTemp ), "%L", LANG_PLAYER, "MB_BETMENU_1_K", gBetsNum[iBet])
else
formatex(szTemp, charsmax( szTemp ), "%L", LANG_PLAYER, "MB_BETMENU_2_K", gBetsNum[iBet])
}
return szTemp
}
/*==========================================
Формирование таймера
===========================================*/
stock ShowTime()
{
new szTemp[64]
formatex(szTemp, charsmax( szTemp ), "%L", LANG_PLAYER, "MB_BETMENU_SHOWTIME", g_iBetDelay)
return szTemp
}
/*==========================================
Получение кол-во игроков
===========================================*/
stock GetPlayerNum()
{
new iNum
for(new i = 1; i <= g_iMaxPlayers; i++)
{
if( IsNotSetBit( g_iBitUserConnected, i ) )
continue
if(cs_get_user_team(i) == CS_TEAM_SPECTATOR)
continue
iNum += 1
}
return iNum
}
/*==========================================
Fakemeta
===========================================*/
stock cs_get_user_team( pId )
return get_pdata_int( pId, 114, 5 );
stock UTIL_SayText(pPlayer, const szMessage[], any:...)
{
new szBuffer[190], iLen = format(szBuffer, charsmax(szBuffer), "%L ", LANG_PLAYER, "MB_BET_CHAT_PREFIX");
if(numargs() > 2) vformat(szBuffer[iLen], charsmax(szBuffer), szMessage, 3);
else copy(szBuffer[iLen], charsmax(szBuffer), szMessage);
while(replace(szBuffer, charsmax(szBuffer), "!y", "^1")) { }
while(replace(szBuffer, charsmax(szBuffer), "!t", "^3")) { }
while(replace(szBuffer, charsmax(szBuffer), "!g", "^4")) { }
switch(pPlayer)
{
case 0:
{
for(new iPlayer = 1; iPlayer <= g_iMaxPlayers; iPlayer++)
{
if( IsNotSetBit( g_iBitUserConnected, iPlayer ) ) continue;
engfunc(EngFunc_MessageBegin, MSG_ONE_UNRELIABLE, 76, {0.0, 0.0, 0.0}, iPlayer);
write_byte(iPlayer);
write_string(szBuffer);
message_end();
}
}
default:
{
engfunc(EngFunc_MessageBegin, MSG_ONE_UNRELIABLE, 76, {0.0, 0.0, 0.0}, pPlayer);
write_byte(pPlayer);
write_string(szBuffer);
message_end();
}
}
}
кто может исправить данный плагин ???
В этой теме было размещено решение! Перейти к решению.
Download all Attachments
-
1.8 KB Просмотры: 196
-
10.4 KB Просмотры: 425