entWatch4: Move unconverted to temp folder
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
//====================================================================================================
|
||||
//
|
||||
// Name: [entWatch] Interface
|
||||
// Author: zaCade & Prometheum
|
||||
// Description: Handle the interface of [entWatch]
|
||||
//
|
||||
//====================================================================================================
|
||||
#include <smlib>
|
||||
|
||||
#pragma newdecls required
|
||||
|
||||
#include <sourcemod>
|
||||
#include <entWatch_core>
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Plugin myinfo =
|
||||
{
|
||||
name = "[entWatch] Interface",
|
||||
author = "zaCade & Prometheum",
|
||||
description = "Handle the interface of [entWatch]",
|
||||
version = "4.0.0"
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnGameFrame()
|
||||
{
|
||||
if (EW_GetItemCount())
|
||||
{
|
||||
char sHUDFormat[250];
|
||||
char sHUDBuffer[64];
|
||||
|
||||
for (int index; index < EW_GetItemCount(); index++)
|
||||
{
|
||||
any itemArray[items];
|
||||
EW_GetItemArray(index, itemArray, sizeof(itemArray));
|
||||
|
||||
if (itemArray[item_display] & DISPLAY_HUD)
|
||||
{
|
||||
if (itemArray[item_owned] && itemArray[item_owner] >= 0)
|
||||
{
|
||||
switch(itemArray[item_mode])
|
||||
{
|
||||
case(1):
|
||||
{
|
||||
if (itemArray[item_nextuse] > RoundToCeil(GetEngineTime()))
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d]: %N", itemArray[item_short], itemArray[item_nextuse] - RoundToCeil(GetEngineTime()), itemArray[item_owner]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%s]: %N", itemArray[item_short], "R", itemArray[item_owner]);
|
||||
}
|
||||
}
|
||||
case(2):
|
||||
{
|
||||
if (itemArray[item_uses] < itemArray[item_maxuses])
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d/%d]: %N", itemArray[item_short], itemArray[item_uses], itemArray[item_maxuses], itemArray[item_owner]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%s]: %N", itemArray[item_short], "D", itemArray[item_owner]);
|
||||
}
|
||||
}
|
||||
case(3):
|
||||
{
|
||||
if (itemArray[item_uses] < itemArray[item_maxuses])
|
||||
{
|
||||
if (itemArray[item_nextuse] > RoundToCeil(GetEngineTime()))
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d]: %N", itemArray[item_short], itemArray[item_nextuse] - RoundToCeil(GetEngineTime()), itemArray[item_owner]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d/%d]: %N", itemArray[item_short], itemArray[item_uses], itemArray[item_maxuses], itemArray[item_owner]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%s]: %N", itemArray[item_short], "D", itemArray[item_owner]);
|
||||
}
|
||||
}
|
||||
case(4):
|
||||
{
|
||||
if (itemArray[item_nextuse] > RoundToCeil(GetEngineTime()))
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d]: %N", itemArray[item_short], itemArray[item_nextuse] - RoundToCeil(GetEngineTime()), itemArray[item_owner]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d/%d]: %N", itemArray[item_short], itemArray[item_uses], itemArray[item_maxuses], itemArray[item_owner]);
|
||||
}
|
||||
}
|
||||
default:
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%s]: %N", itemArray[item_short], "N/A", itemArray[item_owner]);
|
||||
}
|
||||
}
|
||||
|
||||
if (strlen(sHUDFormat) + strlen(sHUDBuffer) <= sizeof(sHUDFormat) - 2)
|
||||
{
|
||||
Format(sHUDFormat, sizeof(sHUDFormat), "%s\n%s", sHUDFormat, sHUDBuffer);
|
||||
}
|
||||
else break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Handle hMessage = StartMessageAll("KeyHintText");
|
||||
BfWriteByte(hMessage, 1);
|
||||
BfWriteString(hMessage, sHUDFormat);
|
||||
EndMessage();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
//====================================================================================================
|
||||
//
|
||||
// Name: [entWatch] Messages
|
||||
// Author: zaCade & Prometheum
|
||||
// Description: Handle the chat messages of [entWatch]
|
||||
//
|
||||
//====================================================================================================
|
||||
#include <smlib>
|
||||
#include <multicolors>
|
||||
|
||||
#pragma newdecls required
|
||||
|
||||
#include <sourcemod>
|
||||
#include <entWatch_core>
|
||||
|
||||
#define MESSAGEFORMAT "\x07%s[entWatch] \x07%s%s \x07%s(\x07%s%s\x07%s) %t \x07%s%s"
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Plugin myinfo =
|
||||
{
|
||||
name = "[entWatch] Messages",
|
||||
author = "zaCade & Prometheum",
|
||||
description = "Handle the chat messages of [entWatch]",
|
||||
version = "4.0.0"
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnPluginStart()
|
||||
{
|
||||
LoadTranslations("entWatch.messages.phrases");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void EW_OnClientItemDrop(any[] itemArray, int client, int index)
|
||||
{
|
||||
if (itemArray[item_display] & DISPLAY_CHAT)
|
||||
{
|
||||
char sName[32];
|
||||
GetClientName(client, sName, sizeof(sName));
|
||||
|
||||
char sAuth[32];
|
||||
GetClientAuthId(client, AuthId_Steam2, sAuth, sizeof(sAuth));
|
||||
|
||||
CRemoveTags(sName, sizeof(sName));
|
||||
CPrintToChatAll(MESSAGEFORMAT, "E01B5D", "EDEDED", sName, "E562BA", "B2B2B2", sAuth, "E562BA", "Item Drop", itemArray[item_color], itemArray[item_name]);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void EW_OnClientItemDeath(any[] itemArray, int client, int index)
|
||||
{
|
||||
if (itemArray[item_display] & DISPLAY_CHAT)
|
||||
{
|
||||
char sName[32];
|
||||
GetClientName(client, sName, sizeof(sName));
|
||||
|
||||
char sAuth[32];
|
||||
GetClientAuthId(client, AuthId_Steam2, sAuth, sizeof(sAuth));
|
||||
|
||||
CRemoveTags(sName, sizeof(sName));
|
||||
CPrintToChatAll(MESSAGEFORMAT, "E01B5D", "EDEDED", sName, "F1B567", "B2B2B2", sAuth, "F1B567", "Item Death", itemArray[item_color], itemArray[item_name]);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void EW_OnClientItemPickup(any[] itemArray, int client, int index)
|
||||
{
|
||||
if (itemArray[item_display] & DISPLAY_CHAT)
|
||||
{
|
||||
char sName[32];
|
||||
GetClientName(client, sName, sizeof(sName));
|
||||
|
||||
char sAuth[32];
|
||||
GetClientAuthId(client, AuthId_Steam2, sAuth, sizeof(sAuth));
|
||||
|
||||
CRemoveTags(sName, sizeof(sName));
|
||||
CPrintToChatAll(MESSAGEFORMAT, "E01B5D", "EDEDED", sName, "C9EF66", "B2B2B2", sAuth, "C9EF66", "Item Pickup", itemArray[item_color], itemArray[item_name]);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void EW_OnClientItemDisconnect(any[] itemArray, int client, int index)
|
||||
{
|
||||
if (itemArray[item_display] & DISPLAY_CHAT)
|
||||
{
|
||||
char sName[32];
|
||||
GetClientName(client, sName, sizeof(sName));
|
||||
|
||||
char sAuth[32];
|
||||
GetClientAuthId(client, AuthId_Steam2, sAuth, sizeof(sAuth));
|
||||
|
||||
CRemoveTags(sName, sizeof(sName));
|
||||
CPrintToChatAll(MESSAGEFORMAT, "E01B5D", "EDEDED", sName, "F1B567", "B2B2B2", sAuth, "F1B567", "Item Disconnect", itemArray[item_color], itemArray[item_name]);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void EW_OnClientItemActivate(any[] itemArray, int client, int index)
|
||||
{
|
||||
if (itemArray[item_display] & DISPLAY_USE)
|
||||
{
|
||||
char sName[32];
|
||||
GetClientName(client, sName, sizeof(sName));
|
||||
|
||||
char sAuth[32];
|
||||
GetClientAuthId(client, AuthId_Steam2, sAuth, sizeof(sAuth));
|
||||
|
||||
CRemoveTags(sName, sizeof(sName));
|
||||
CPrintToChatAll(MESSAGEFORMAT, "E01B5D", "EDEDED", sName, "67ADDF", "B2B2B2", sAuth, "67ADDF", "Item Activate", itemArray[item_color], itemArray[item_name]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user