forked from UNLOZE/sm-plugins
updates for entwatch to work
This commit is contained in:
@@ -526,25 +526,26 @@ public void OnClientDeath(Event hEvent, const char[] sEvent, bool bDontBroadcast
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Action OnWeaponPickup(int client, int weapon)
|
||||
{
|
||||
if (Client_IsValid(client) && Entity_IsValid(weapon) && g_hArray_Items.Length)
|
||||
{
|
||||
for (int index; index < g_hArray_Items.Length; index++)
|
||||
{
|
||||
CItem item = g_hArray_Items.Get(index);
|
||||
if (Client_IsValid(client) && Entity_IsValid(weapon) && g_hArray_Items.Length)
|
||||
{
|
||||
for (int index; index < g_hArray_Items.Length; index++)
|
||||
{
|
||||
CItem item = g_hArray_Items.Get(index);
|
||||
|
||||
if (item.bWeapon && item.iWeapon == weapon)
|
||||
{
|
||||
item.iClient = client;
|
||||
if (item.bWeapon && item.iWeapon == weapon)
|
||||
{
|
||||
item.iClient = client;
|
||||
|
||||
Call_StartForward(g_hFwd_OnClientItemPickup);
|
||||
Call_PushCell(client);
|
||||
Call_PushCell(index);
|
||||
Call_Finish();
|
||||
Call_StartForward(g_hFwd_OnClientItemPickup);
|
||||
Call_PushCell(client);
|
||||
Call_PushCell(index);
|
||||
Call_Finish();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Plugin_Handled;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@@ -552,25 +553,26 @@ public Action OnWeaponPickup(int client, int weapon)
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Action OnWeaponDrop(int client, int weapon)
|
||||
{
|
||||
if (Client_IsValid(client) && Entity_IsValid(weapon) && g_hArray_Items.Length)
|
||||
{
|
||||
for (int index; index < g_hArray_Items.Length; index++)
|
||||
{
|
||||
CItem item = g_hArray_Items.Get(index);
|
||||
if (Client_IsValid(client) && Entity_IsValid(weapon) && g_hArray_Items.Length)
|
||||
{
|
||||
for (int index; index < g_hArray_Items.Length; index++)
|
||||
{
|
||||
CItem item = g_hArray_Items.Get(index);
|
||||
|
||||
if (item.bWeapon && item.iWeapon == weapon)
|
||||
{
|
||||
item.iClient = INVALID_ENT_REFERENCE;
|
||||
if (item.bWeapon && item.iWeapon == weapon)
|
||||
{
|
||||
item.iClient = INVALID_ENT_REFERENCE;
|
||||
|
||||
Call_StartForward(g_hFwd_OnClientItemDrop);
|
||||
Call_PushCell(client);
|
||||
Call_PushCell(index);
|
||||
Call_Finish();
|
||||
Call_StartForward(g_hFwd_OnClientItemDrop);
|
||||
Call_PushCell(client);
|
||||
Call_PushCell(index);
|
||||
Call_Finish();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Plugin_Handled;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user