Permalink
Browse files

Add mp_playerid check

Fake+Invisible Name requires mp_playerid 2!
  • Loading branch information...
Bara committed Oct 23, 2018
1 parent e79eb66 commit 5759647d0f0179e2523e9a3f8a1b65513d468967
Showing with 22 additions and 0 deletions.
  1. +22 −0 addons/sourcemod/scripting/ttt/ttt_fakename.sp
@@ -105,6 +105,11 @@ public Action TTT_OnItemPurchased(int client, const char[] itemshort, bool count
{
if (StrEqual(itemshort, SHORT_NAME, false))
{
if (!CheckPlayerID())
{
return Plugin_Stop;
}
int role = TTT_GetClientRole(client);
char sName[128];
@@ -149,6 +154,11 @@ public Action TTT_OnItemPurchased(int client, const char[] itemshort, bool count
}
else if (StrEqual(itemshort, SHORT_NAME_INVI, false))
{
if (!CheckPlayerID())
{
return Plugin_Stop;
}
int role = TTT_GetClientRole(client);
char sName[128];
@@ -257,3 +267,15 @@ void ResetInvisible(int client)
g_hInviTimer[client] = null;
}
bool CheckPlayerID()
{
ConVar cvar = FindConVar("mp_playerid");
if (cvar.IntValue == 2)
{
return true;
}
return false;
}

0 comments on commit 5759647

Please sign in to comment.