Permalink
Browse files

Hide "Item Bought" message when it was for free

  • Loading branch information...
Bara committed Jun 9, 2018
1 parent d36ed37 commit 4db07a215548310e75621f05cf1b4128e313ce64
@@ -0,0 +1,27 @@
#pragma semicolon 1
#include <sourcemod>
#include <ttt>
#include <ttt_shop>
#include <ttt_weapons>
#pragma newdecls required
#define PLUGIN_NAME TTT_PLUGIN_NAME ... " - Start With Items"
public Plugin myinfo =
{
name = PLUGIN_NAME,
author = TTT_PLUGIN_AUTHOR,
description = TTT_PLUGIN_DESCRIPTION,
version = TTT_PLUGIN_VERSION,
url = TTT_PLUGIN_URL
};
public void TTT_OnClientGetRole(int client, int role)
{
if (role == TTT_TEAM_DETECTIVE)
{
TTT_GiveClientItem(client, KEVHELM_D_ITEM_SHORT);
}
}
@@ -4029,7 +4029,6 @@ public Action OnUse(int entity, int activator, int caller, UseType type, float v
{
return Plugin_Handled;
}
else
{
if (g_iRole[activator] == TTT_TEAM_INNOCENT || g_iRole[activator] == TTT_TEAM_DETECTIVE || g_iRole[activator] == TTT_TEAM_UNASSIGNED)
@@ -683,7 +683,12 @@ bool ClientBuyItem(int client, char[] item, bool menu, bool free = false)
if (res < Plugin_Stop)
{
setCredits(client, (g_iCredits[client] - price));
CPrintToChat(client, "%s %T", g_sPluginTag, "Item bought! (NEW)", client, g_iCredits[client], temp_item[Long], price);
if (!free)
{
CPrintToChat(client, "%s %T", g_sPluginTag, "Item bought! (NEW)", client, g_iCredits[client], temp_item[Long], price);
}
return true;
}
}

0 comments on commit 4db07a2

Please sign in to comment.