From fa3d28872ebf80d497d6464d7df8681cbd27b398 Mon Sep 17 00:00:00 2001 From: Freeman-AM Date: Sat, 11 Mar 2017 14:58:10 +0100 Subject: [PATCH] Replace s/get_pdata* with s/get_ent_data* in plmenu.sma (#424) --- plugins/plmenu.sma | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/plugins/plmenu.sma b/plugins/plmenu.sma index 848aa369..bf96d873 100755 --- a/plugins/plmenu.sma +++ b/plugins/plmenu.sma @@ -37,7 +37,7 @@ new g_clcmdNum; new g_coloredMenus; new bool:g_cstrike = false; -new bool:g_fakemeta = false, m_iMenu, m_bTeamChanged, Menu_ChooseAppearance; +new bool:g_fakemeta = false; new Array:g_bantimes; new Array:g_slapsettings; @@ -127,9 +127,6 @@ public plugin_init() if (LibraryExists("fakemeta", LibType_Library)) { g_fakemeta = true; - m_iMenu = 205; - m_bTeamChanged = 501; - Menu_ChooseAppearance = 3; } new modname[9]; @@ -831,7 +828,7 @@ public actionTeamMenu(id, key) { if (g_fakemeta) { - if (get_pdata_int(player, m_iMenu) == Menu_ChooseAppearance) + if (get_ent_data(player, "CBasePlayer", "m_iMenu") == CS_Menu_ChooseAppearance) { // works for both vgui and old style menus, and send menuselect could close other menus (and since get_user_menu fails to return VGUI and old style classes menus...) engclient_cmd(player, "joinclass", "6"); @@ -863,7 +860,7 @@ public actionTeamMenu(id, key) } if (g_fakemeta) { - set_pdata_bool(player, m_bTeamChanged, true); + set_ent_data(player, "CBasePlayer", "m_bTeamChanged", true); } new limit_setting; if (mp_limitteams) @@ -906,7 +903,7 @@ public actionTeamMenu(id, key) } if (g_fakemeta) { - set_pdata_bool(player, m_bTeamChanged, true); + set_ent_data(player, "CBasePlayer", "m_bTeamChanged", true); } g_transferingAdmin = 0;