Incerc sa adaug o schimbare mica la el,daca de exemplu ai level 10,si la sfarsitul rundei oameni castiga,cei ce sunt vii,primesc frag-uri in functie de level,Level 10 = 10 Frag-uri de fiecare data cand castiga oamenii vii.
Pluginul responsabil pentru această funcție este ze_effect_frags,plugin-ul merge bine,da frag-urile corect,dar in consola imi apar niste erori de fiecare data cand runda se termina.
Observ ca arunca si o eroare din include zombie_escape_stocks.inc asa ca o sa pun un link de descarcare mai jos.
Plugin ze_effect_frags:
Code: Select all
#include <zombie_escape>
#include <ze_levels>
// Variables
new g_iMaxClients
// Cvars
new g_pCvarHumanInfectedFrags,
g_pCvarEscapeSuccessFrags,
g_pCvarInfectionDeaths
public plugin_init()
{
register_plugin("[ZE] Frags Awards/Death Effects", ZE_VERSION, AUTHORS)
// Cvars
g_pCvarHumanInfectedFrags = register_cvar("ze_human_infected_frags", "1")
g_pCvarInfectionDeaths = register_cvar("ze_infection_deaths", "1")
g_pCvarEscapeSuccessFrags = register_cvar("ze_escape_success_frags", "3")
// Static Values
g_iMaxClients = get_member_game(m_nMaxPlayers)
}
public ze_user_infected(iVictim, iInfector)
{
if (iInfector == 0) // Block Awards for Zombies Chosen by the Server
return
// Award Zombie Who infected, And Increase Deaths of the infected human
UpdateFrags(iInfector, iVictim, get_pcvar_num(g_pCvarHumanInfectedFrags), get_pcvar_num(g_pCvarInfectionDeaths), 1)
// Adding Infection icon on Victim Screen
InfectionIcon(iVictim)
// Fix Dead Attribute (Delay needed)
set_task(0.1, "Fix_DeadAttrib", _, _, _, "a", 6)
}
public ze_roundend(WinTeam)
{
if (WinTeam == ZE_TEAM_HUMAN)
{
for (new i = 1; i <= g_iMaxClients; i++)
{
// Skip All Dead Players or Zombies
if (!is_user_alive(i) || get_member(i, m_iTeam) == TEAM_TERRORIST)
continue
// + Frags for All humans Who are Alive
UpdateFrags(i, 0, ze_get_user_level(i), 0, 1)
}
}
}
public Fix_DeadAttrib()
{
for (new i = 1; i <= g_iMaxClients; i++)
{
// Skip All Dead And Humans
if (!is_user_alive(i) || get_member(i, m_iTeam) == TEAM_CT)
continue
// Fix the Dead Attribute
FixDeadAttrib(i)
}
Code: Select all
L 04/10/2023 - 15:42:01: [ReAPI] get_member_s: 'm_iDeaths' has no refs to the base class of an entity 'worldspawn'
L 04/10/2023 - 15:42:01: [AMXX] Displaying debug trace (plugin "ze_effects_frags.amxx", version "1.6")
L 04/10/2023 - 15:42:01: [AMXX] Run time error 10: native error (native "get_member_s")
L 04/10/2023 - 15:42:01: [AMXX] [0] zombie_escape_stocks.inc::UpdateFrags (line 238)
L 04/10/2023 - 15:42:01: [AMXX] [1] ze_effects_frags.sma::ze_roundend (line 51)