R1KO
fuck society
- Сообщения
- 9,457
- Реакции
- 7,786
- Команда форума
- Автор ресурса
- #121
@artushonok,
PHP:
#pragma semicolon 1
#include <sourcemod>
#include <zombiereloaded>
#include <throwing_knives_core>
bool g_bZombieSpawned = false;
public void OnPluginStart()
{
HookEvent("round_start", Event_RoundStart, EventHookMode_PostNoCopy);
}
public void Event_RoundStart(Event hEvent, const char[] szEvName, bool bDontBroadcast)
{
g_bZombieSpawned = false;
}
public Action ZR_OnClientInfect(int &iClient, int &iAttacker, bool &motherInfect, bool &respawnOverride, bool &respawn)
{
if(motherInfect)
g_bZombieSpawned = true;
return Plugin_Continue;
}
public bool TKC_OnKnifeThrow(int iClient)
{
if(g_bZombieSpawned && ZR_IsClientZombie(iClient))
{
return false;
}
return true;
}