Plugin Not Working [Backward Compatibility Issue]

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
213
Реакции
71
Помог
2 раз(а)
Ошибка
Error is with Plugin, AMXX is not supporting backward compatibility for the VIP plugin, Players are getting Nades but not getting Guns.
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5234 (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: Nov 3 2018 14:55:29
Built from: https://github.com/alliedmodders/amxmodx/commit/9eb1f42
Build ID: 5234:9eb1f42
Билд
AMX Mod X 1.9.0.5234 (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: Nov 3 2018 14:55:29
Built from: https://github.com/alliedmodders/amxmodx/commit/9eb1f42
Build ID: 5234:9eb1f42
ReGamedll
ReGameDLL version: 5.7.0.318-dev
Build date: 21:07:26 Oct 30 2018
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/932001b
Версия Metamod
Metamod v1.21p37  2013/05/30 (5:13)
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
by Jussi Kivilinna
http://metamod-p.sourceforge.net/
compiled: May 30 2013, 11:41:16 EET (optimized)
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386. v0.1.0.1 ini Start Never
[ 3] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0.5 ini Start ANY
[ 4] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 5] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 6] Revoice RUN - revoice_mm_i386. v0.1.0.3 ini Start Never
[ 7] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 8] WHBlocker RUN - whblocker_mm_i38 v1.5.696 ini Chlvl ANY
[ 9] NetBufExtender RUN - nbex.so v1.0 ini ANY Never
[10] Fun RUN - fun_amxx_i386.so v1.9.0.5 pl3 ANY ANY
[11] Engine RUN - engine_amxx_i386 v1.9.0.5 pl3 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl3 ANY ANY
[13] GeoIP RUN - geoip_amxx_i386. v1.9.0.5 pl3 ANY ANY
[14] CStrike RUN - cstrike_amxx_i38 v1.9.0.5 pl3 ANY ANY
[15] CSX RUN - csx_amxx_i386.so v1.9.0.5 pl3 ANY ANY
[16] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl3 ANY ANY
[17] ReAPI RUN - reapi_amxx_i386. v5.6.0.1 pl3 ANY Never
[18] hackdetector RUN - hackdetector_amx v0.15.32 pl3 ANY ANY
[19] ReAimDetector RUN - reaimdetector_am v0.2.2 pl3 ANY Never
[20] MySQL RUN - mysql_amxx_i386. v1.9.0.5 pl3 ANY ANY
20 plugins, 20 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] KBS 1.1.2 K@[L]@uz kbs.amxx running
[ 2] Admin Commands Log 16.10.2018 w0w admin_commands_ running
[ 3] Admin Base 1.9.0.5234 AMXX Dev Team admin.amxx running
[ 4] Admin Commands 1.9.0.5234 AMXX Dev Team admincmd.amxx running
[ 5] Admin Help 1.9.0.5234 AMXX Dev Team adminhelp.amxx running
[ 6] Multi-Lingual System 1.9.0.5234 AMXX Dev Team multilingual.am running
[ 7] Menus Front-End 1.9.0.5234 AMXX Dev Team menufront.amxx running
[ 8] Commands Menu 1.9.0.5234 AMXX Dev Team cmdmenu.amxx running
[ 9] New KickMenu 2.0 Flash kickmenu.amxx running
[ 10] Players Menu 1.9.0.5234 AMXX Dev Team plmenu.amxx running
[ 11] Maps Menu 1.9.0.5234 AMXX Dev Team mapsmenu.amxx running
[ 12] Plugin Menu 1.9.0.5234 AMXX Dev Team pluginmenu.amxx running
[ 13] AMXX Gag 1.5.0 xPaw & Exolent amx_gag.amxx running
[ 14] Chat Manager 1.1.1-11 Mistrick chatmanager.amx running
[ 15] Chat Manager: Addon 0.0.4-70 Mistrick chatmanager_add running
[ 16] Anti Flood 1.9.0.5234 AMXX Dev Team antiflood.amxx running
[ 17] Admin Votes 1.9.0.5234 AMXX Dev Team adminvote.amxx running
[ 18] NextMap 1.9.0.5234 AMXX Dev Team nextmap.amxx running
[ 19] Roundsleft 0.2 JGHG roundsleft_nosp running
[ 20] Stats Configuration 1.9.0.5234 AMXX Dev Team statscfg.amxx running
[ 21] StatsX 1.9.0.5234 AMXX Dev Team statsx.amxx running
[ 22] 2x2 2.5re s1lent mode.amxx running
[ 23] Block Ip In Nick 1.0 Alpha Alik Inline Asla BlockIpInNick.a running
[ 24] Steamers Info 1.0 K@[L]@uz steamers_info.a running
[ 25] [KC] Admin Color Chat 1.0 Edit By Alber Khan_admin_colo running
[ 26] Map Spawns Editor 1.0.16 iG_os Map_Spawns_Edit running
[ 27] Reset Score 1.0.1 K@[L]@uz Khan_ResetScore running
[ 28] Autoresponder/Advertis 0.5 MaximusBrood ad_manager5.amx running
[ 29] Ping Faker 1.5a MeRcyLeZZ pingfaker.amxx running
[ 30] Server BETS 1.0 Mi-Ki bets.amxx running
[ 31] Advanced Bullet Damage 1.0 Sn!ff3r abd.amxx running
[ 32] c4 timer 1.1 cheap_suit c4timer.amxx running
[ 33] Auto Join on Connect 0.1 VEN auto_join_on_co running
[ 34] [KC] Info Rounds By Al 1.0 K@[L]@uz Khan_inforounds running
[ 35] Descriptive 'Fire in t 0.1 VEN colored_radio.a running
[ 36] WalkGuard 1.3.2 mogel walkguard.amxx running
[ 37] VIP Eng Version 3.0 Dunno Khan_VIP_WO_SG. running
[ 38] AMX Client Exec 0.03 v3x amx_exec.amxx running
[ 39] AFK Bomb Transfer 0.4 VEN afkbombtransfer running
[ 40] File Checker 1.0 WrongTurn file_checker.am running
[ 41] K@[L]@uz Steamers Rewa 0.1 K@[L]@uz Khan_ksr.amxx running
[ 42] Boost Server 1.0 K@[L]@UZ boost_server.am running
[ 43] Invisible Spectator 0.2 ConnorMcLeod Khan_Invis_Spec running
[ 44] unknown unknown unknown gamename.amxx running
[ 45] Buy VIP With Points 0.0.4 Jhob94 buy_vip_points_ running
[ 46] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash.a running
[ 47] ReAimDetector API 0.2.1 ReHLDS Team reaimdetector.a running
[ 48] xREDIRECT 1.0.3.3 x0R xredirect.amxx running
[ 49] Permanent message 1.1 He3aBuCuM permanent_messa running
[ 50] Played Time 1.4 Alka > Edit By A played_time_aut running
[ 51] Admin Spectator ESP 1.5 KoST admin_spec_esp_ debug
[ 52] KGB Bots 2.3 OvidiuS & Desika kgbbots.amxx running
[ 53] FragCounter 1.01 Scarzzurs fragcounter.amx debug
[ 54] Team Balancer 1.8b3 Ptahhotep ptb.amxx debug
[ 55] Slaylosers lite 0.1.16 iG_os Slaylosers_lite debug
55 plugins, 55 running
Hello, Yesterday I updated my servers to 1.90 and now this plugin is not working.

This Plugin Is 1.8.2 and AMXX 1.90 is not giving backward compatibility for it.

Its been known by Server Players, plugin is providing Nades But Not Weapons [Still Not Sure Nades Or Provided Or Not].

May Be there is problem with Menu Opening.

Please Help !!! Can Someone Make Code Compitable For AMXX 1.90

Tranquillity Brother, Kindly, Look For The Issue, Regarding This Backward Compatibility.

PHP:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>

#define DAMAGE_RECIEVED

#define IsClientValid(%0,%1) ( (1 <= %0 <= g_iMaxClients) && %0 != %1 )

#define g_iKeysrod (1<<0)|(1<<1)|(1<<9)

new bool:HasC4[33] = { false, ... };
new bool:HasConnected[33] = { false, ... };
new bool:HasVip[33] = { false, ... };

#if defined DAMAGE_RECIEVED
new g_msgSync2;
#endif

new g_msgSayText;
new g_msgSync;
new g_iMaxClients;
new g_iCurrRound = -1;

new g_pMpd;
new g_pMkb;
new g_pMhb;
new g_pHealthAdd;
new g_pHsAdd;
new g_pMaxHealth;
new g_pMenuActive;
new g_pMenuCancel;
new g_pContact;

public plugin_init()
{
register_plugin("VIP Eng Version", "3.0", "Dunno");

g_pMpd = register_cvar("money_per_damage", "3");
g_pMkb = register_cvar("money_kill_bonus", "200");
g_pMhb = register_cvar("money_hs_bonus", "500");
g_pHealthAdd = register_cvar("amx_vip_hp", "15");
g_pHsAdd = register_cvar("amx_vip_hp_hs", "30");
g_pMaxHealth = register_cvar("amx_vip_max_hp", "100");
g_pMenuActive = register_cvar("menu_active", "1");
g_pMenuCancel = register_cvar("amx_vip_menu_cancel", "30");
g_pContact = register_cvar("amx_contactinfo", "khan-cs.mojkgb.com", FCVAR_SERVER);

register_menucmd(register_menuid("rod"), g_iKeysrod, "Pressedrod");

register_clcmd("say /vip", "HandleVipCmd");
register_clcmd("say_team /vip", "HandleVipCmd");
register_clcmd("say /vips", "HandleVipCmd");
register_clcmd("say_team /vips", "HandleVipCmd");

register_clcmd("say /wantvip", "ShowMotd");
register_clcmd("say_team /wantvip", "ShowMotd");

register_logevent("levt_RoundStart", 2, "1=Round_Start");
RegisterHam(Ham_Killed, "player", "fw_KilledPlayer");

register_event("TextMsg", "evt_RoundRestart", "a", "2&#Game_w");
register_event("DeathMsg", "evt_Death", "a", "1>0");
register_event("Damage", "evt_Damage", "b");
register_event("Damage", "evt_OnDamage", "b", "2!0", "3=0", "4!0");

g_iMaxClients  = get_maxplayers();
g_msgSayText = get_user_msgid("SayText");

g_msgSync = CreateHudSyncObj();
#if defined DAMAGE_RECIEVED
g_msgSync2 = CreateHudSyncObj();
#endif
}

public client_authorized(id)
{
HasVip[id] = bool:(get_user_flags(id) & ADMIN_LEVEL_H);
}

public client_putinserver(id)
{
if (!is_user_bot(id))
{
HasConnected[id] = true;
set_task(30.0, "PrintText", id);
}
}

public client_disconnect(id)
{
HasConnected[id] = false;
HasVip[id] = false;
}

public evt_OnDamage(id)
{
static attacker, damage;
attacker = get_user_attacker(id);

if(!IsClientValid(attacker, id))
return;

#if defined DAMAGE_RECIEVED
if ( HasConnected[id] && HasConnected[attacker] && HasVip[attacker])
{
damage = read_data(2);

set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1);
ShowSyncHudMsg(id, g_msgSync2, "%i^n", damage)
#else
if ( HasConnected[attacker] && HasVip[attacker] )
{
damage = read_data(2);
#endif
set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1);
ShowSyncHudMsg(attacker, g_msgSync, "%i^n", damage);
}
}

public evt_Damage(id)
{
static weapon, hitpoint, attacker;
attacker = get_user_attacker(id, weapon, hitpoint);

if(IsClientValid(attacker, id) && is_user_alive(attacker))
if (HasVip[attacker])
{
new money = read_data(2) * get_pcvar_num(g_pMpd);
if (hitpoint == 1) money += get_pcvar_num(g_pMhb);
cs_set_user_money(attacker, cs_get_user_money(attacker) + money);
}
}

public fw_KilledPlayer(victim, killer, shouldgib)
{
if (IsClientValid(killer, victim) && HasConnected[killer])
cs_set_user_money(killer, cs_get_user_money(killer) + get_pcvar_num(g_pMkb) - 300);
}

public levt_RoundStart()
{
vip_reload();

if (g_iCurrRound < 0)
return;

g_iCurrRound++;

new aPlayers[32], num, pl, ismenu;
get_players(aPlayers, num, "ac");
ismenu = get_pcvar_num(g_pMenuActive);

for (new i = 0; i < num; i++)
{
pl = aPlayers[i];
if (HasVip[pl])
{
if (g_iCurrRound >= 2)
{
give_item(pl, "weapon_hegrenade");
give_item(pl, "weapon_flashbang");
give_item(pl, "weapon_flashbang");
give_item(pl, "weapon_smokegrenade");
give_item(pl, "item_assaultsuit");

if (get_user_team(pl) == 2)
give_item(pl, "item_thighpack");
}

if (g_iCurrRound >= 3 && ismenu)
Showrod(pl);
}
}
}

public evt_RoundRestart()
{
g_iCurrRound = 0;
}

public evt_Death()
{
static killer;
killer = read_data(1);

if (!HasVip[killer]) return;

static hp, hpadd, hpmax;

if ( (read_data(3) == 1) && (read_data(5) == 0) )
hpadd = get_pcvar_num(g_pHsAdd);
else
hpadd = get_pcvar_num(g_pHealthAdd);

hpmax = get_pcvar_num(g_pMaxHealth);

hp = get_user_health(killer);
hp += hpadd;

if (hp > hpmax) hp = hpmax;
set_user_health(killer, hp);

set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1);
show_hudmessage(killer, "Healed +%d hp", hpadd);

message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, killer);
write_short(1<<10);
write_short(1<<10);
write_short(0x0000);
write_byte(0);
write_byte(0);
write_byte(200);
write_byte(75);
message_end();
}

public Showrod(id)
{
static const szGunMenu[] = "\y[KC] Free VIP Guns^n^n\w1. Get M4A1+Deagle^n\w2. Get AK47+Deagle^n^n\y0. Exit";

new iTimeout = -1;
new iMenuCancel = get_pcvar_num(g_pMenuCancel);

if ( iMenuCancel > 0 )
{
iTimeout = iMenuCancel;
print_message(id, "^4[KC] ^1You have ^3%d ^1seconds, to select a vip item or menu will be closed.", iMenuCancel);
}

show_menu(id, g_iKeysrod, szGunMenu, iTimeout, "rod");
}

public Pressedrod(id, key) {
/* Menu:
* VIP Menu
* 1. Get M4A1+Deagle
* 2. Get AK47+Deagle
* 0. Exit
*/
new team = get_user_team(id);
switch (key) {
case 0: {
if (user_has_weapon(id, CSW_C4) && team == 1)
HasC4[id] = true;
else
HasC4[id] = false;

strip_user_weapons(id);
give_item(id, "weapon_m4a1");
ExecuteHamB(Ham_GiveAmmo, id, 90, "556nato", 90);
give_item(id, "weapon_deagle");
ExecuteHamB(Ham_GiveAmmo, id, 35, "50ae", 35);
give_item(id, "weapon_knife");
give_item(id, "weapon_hegrenade");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_smokegrenade");
give_item(id, "item_assaultsuit");

if (team == 2)
give_item(id, "item_thighpack");

print_message(id, "^4[KC]^3 You Taked Free M4A1 and Deagle");

if (HasC4[id])
{
give_item(id, "weapon_c4");
cs_set_user_plant(id);
}
}
case 1: {
if (user_has_weapon(id, CSW_C4) && team == 1)
HasC4[id] = true;
else
HasC4[id] = false;

strip_user_weapons(id);
give_item(id, "weapon_ak47");
ExecuteHamB(Ham_GiveAmmo, id, 90, "762nato", 90);
give_item(id, "weapon_deagle");
ExecuteHamB(Ham_GiveAmmo, id, 35, "50ae", 35);
give_item(id, "weapon_knife");
give_item(id, "weapon_hegrenade");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_smokegrenade");
give_item(id, "item_assaultsuit");

if (team == 2)
give_item(id, "item_thighpack");

print_message(id, "^4[KC]^3 You Taked Free AK47 and Deagle");

if (HasC4[id])
{
give_item(id, "weapon_c4");
cs_set_user_plant(id);
}
}
}
return PLUGIN_CONTINUE;
}

public ShowMotd(id)
{
show_motd(id, "vip.txt");
}

public PrintText(id)
{
print_message(id, "^4[KC]^1 For VIP info write^4 /wantvip^1 and u will see how to get VIP and VIP privilegies.");
}

public HandleVipCmd(id)
{
set_task(0.1, "PrintVipList", id);
return PLUGIN_HANDLED;
}

public PrintVipList(id)
{
new aPlayers[32], num, pl;
get_players(aPlayers, num, "ch");

new adminnames[33][32], count;

for (new i = 0; i < num; i++)
{
pl = aPlayers[i];
if (HasVip[pl])
get_user_name(pl, adminnames[count++], 31);
}

new message[192];
new len = add(message, 191, "^4[KC] ^3VIP Online:^4 ");

if (count > 0) {
for (new j = 0 ; j < count ; j++) {
len += formatex(message[len], 191-len, "%s%s ", adminnames[j], j < (count-1) ? "^1,^4 " : "");
if (len > 96 ) {
print_message(id, message);
message[0] = EOS;
message[0] = 0x04;
len = 1;
}
}
print_message(id, message);
}
else {
add(message, 191, "No VIP online.");
print_message(id, message);
}

new contact[64];
get_pcvar_string(g_pContact, contact, 63);

if (contact[0]) {
new contactinfo[192];
formatex(contactinfo, 191, "^4Contact Server Admin:^3 %s", contact);

print_message(id, contactinfo);
}
}

vip_reload()
{
new aPlayers[32], num, pl;
get_players(aPlayers, num, "ch");

for (new i = 0; i < num; i++)
{
pl = aPlayers[i];
HasVip[pl] = bool:(get_user_flags(pl) & ADMIN_LEVEL_H);
}
}

stock print_message(id, const msg[], any:...)
{
if (!HasConnected[id])
return;

new sMessage[191], iParams;
iParams = numargs();

if ( iParams == 2 )
copy(sMessage, 190, msg);
else
vformat(sMessage, 190, msg, 3);

message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, .player=id);
write_byte(id);
write_string(sMessage);
message_end();
}
 
В этой теме было размещено решение! Перейти к решению.
Последнее редактирование:
Сообщения
1,420
Реакции
2,511
Помог
58 раз(а)
A really bad source file. As I see when you click on "1" in VIP Menu you should receive m4a1+deagle. Don't you receive it?
 
Сообщения
1,420
Реакции
2,511
Помог
58 раз(а)
DrStrange, do you mean that menu is not opened when you write /vip? In this case, change:
Код:
-register_clcmd("say /vip", "HandleVipCmd");
-register_clcmd("say_team /vip", "HandleVipCmd");
+register_clcmd("say /vip", "Showrod");
+register_clcmd("say_team /vip", "Showrod");
 
Сообщения
213
Реакции
71
Помог
2 раз(а)
DrStrange, do you mean that menu is not opened when you write /vip? In this case, change:
Код:
+register_clcmd("say /vip", "Showrod");
+register_clcmd("say_team /vip", "Showrod");
-register_clcmd("say /vip", "HandleVipCmd");
-register_clcmd("say_team /vip", "HandleVipCmd");
w0w /vip is to show VIPs Online.

Menu is opened automatically at the start of round after First 2 Rounds.
25 Ноя 2018
Line: 49 And
218 to 303 (May be)
 
Сообщения
1,420
Реакции
2,511
Помог
58 раз(а)
DrStrange, menu_active should be 1. Write amx_cvar menu_active in server console. What do you get?
 
Сообщения
1,420
Реакции
2,511
Помог
58 раз(а)
It's a problem of the plugin, not of AMX Mod X 1.9.0. Lines 145-146:

Код:
-if (g_iCurrRound < 0)
-return;
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу