From cc22ef3f050073aabd1d311ac746d297a63ce482 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sun, 16 Dec 2018 16:05:18 -0500 Subject: [PATCH] Add deprecation warning to admin --- src/dehacked.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dehacked.c b/src/dehacked.c index db1d6eed..dd671fd7 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -8303,6 +8303,7 @@ static inline int lib_getenum(lua_State *L) LUA_PushUserdata(L, &players[serverplayer], META_PLAYER); return 1; } else if (fastcmp(word,"admin")) { // BACKWARDS COMPATIBILITY HACK: This was replaced with IsPlayerAdmin(), but some 2.1 Lua scripts still use the admin variable. It now points to the first admin player in the array. + LUA_Deprecated(L, "admin", "IsPlayerAdmin(player)"); if (!playeringame[adminplayers[0]] || IsPlayerAdmin(serverplayer)) return 0; LUA_PushUserdata(L, &players[adminplayers[0]], META_PLAYER);