Bugs and Errors help me fixing them

Unpaid Requests, Public Plugins
Post Reply
pirate228
Member
Member
India
Posts: 18
Joined: 5 years ago
Contact:

Bugs and Errors help me fixing them

#1

Post by pirate228 » 4 years ago

Credits who helped me in finding bugs:
-=:Dark Shadow:=-

1: Nemesis frags

Error: Not reflecting frags on scoreboard
I have tried giving nemesis frags in this method

step 1: new g_pCvarNemesisKilledFrags
step 2: g_pCvarNemesisKilledFrags = register_cvar("ze_nemesis_killing_frags", "15")
step 3: public ze_user_infected_pre(iVictim, iAttacker)
{
if (g_bIsNemesis[iAttacker] && !ze_is_user_zombie(iVictim))
{
ExecuteHamB(Ham_Killed, iVictim, iAttacker, 0)
UpdateFrags(iVictim, iAttacker, get_pcvar_num(g_pCvarNemesisKilledFrags), 0, 1)

return 1
}

return
}

2: Frost on nemesis is not working
public ze_frost_pre(id)
{
if (g_bIsNemesis[id] && get_pcvar_num(g_pCvarNemesisFreeze))
return PLUGIN_HANDLED
return PLUGIN_CONTINUE
}
Error: Not freezing nemesis
this is used in nemesis round plugin but then also nemesis is not getting freezed when frost nade is thrown on homing, impact or trip lazers

3: last human plugin error

#include <zombie_escape>

#define TASK 1100

new g_iLastHumanIndex

public plugin_init()
{
register_plugin("[ZE] Addons: Kill last human", "1.0", "Barney")
}

public ze_game_started()
{
set_task(0.1, "Check_Humans", TASK, _, _, "b")
}

public Check_Humans(TaskID)
{
if (ze_is_game_started() && (ze_get_humans_number() == 1))
{
for (new id = 1; id <= get_member_game(m_nMaxPlayers); id++)
{
if (ze_is_user_zombie(id) || !is_user_alive(id))
continue

g_iLastHumanIndex = id
remove_task(TASK)
break
}
}
}

public ze_user_infected_pre(iVictim, iInfector, iDamage)
{
if (iVictim == g_iLastHumanIndex && is_user_alive(iVictim) && is_user_alive(iInfector))
{
ExecuteHamB(Ham_Killed, iVictim, iInfector, 0)
return PLUGIN_HANDLED
}

return PLUGIN_CONTINUE
}
Error:
not working I tried ze_get_humans_number() == 1 and 0
KICKED :
error : you killed 1 and 2 teammate
error : you killed 2 and 3 teammate
error : you killed 3 and 4 teammate
Last edited by pirate228 4 years ago, edited 1 time in total.

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#2

Post by Muhammet20 » 4 years ago

remove kick on kill teammates to fix last problem
and for other problems i will find a fix then help you

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#3

Post by Muhammet20 » 4 years ago

try this for frags:

Code: Select all

public ze_user_infected_pre(iVictim, iAttacker)
{
	if(g_bIsNemesis[iAttacker] && !ze_is_user_zombie(iVictim))
	{
		set_user_frags(iAttacker, get_user_frags(iAttacker)+1)
		set_user_deaths(iVictim, get_user_deaths(iVictim)+1)
	}
	return
}

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: Bing [Bot] and 5 guests