Xp and coin reducer for campers
u can put something like if (!ze_is_user_zombie(id) && trigger hurt something like that?[the map explosion i mean])
LOL
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
When I am Spectator, I lose xp and coins too, can you change it ?
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
- #include <zombie_escape>
- #include <ze_levels>
- new g_pCvarXP, g_pCvarECoins
- public plugin_init()
- {
- register_plugin("[ZE] Addons: Reduce on fail escape", "1.0", "Jack GamePlay")
- g_pCvarECoins = register_cvar("ze_escapecoins", "1")
- g_pCvarXP = register_cvar("ze_xp", "1")
- }
- public ze_roundend(Winner)
- {
- if (Winner == ZE_TEAM_HUMAN)
- {
- for (new id = 1; id <= get_member_game(m_nMaxPlayers); id++)
- {
- if (ze_is_user_zombie(id) || get_member(id, m_iTeam) == TEAM_SPECTATOR)
- continue
- if (!ze_is_user_zombie(id) && !is_user_alive(id))
- {
- if (ze_get_escape_coins(id) - get_pcvar_num(g_pCvarECoins) <= 0)
- {
- ze_set_escape_coins(id, 0)
- ze_colored_print(id, "You lost your EC.")
- }
- else
- {
- ze_set_escape_coins(id, ze_get_escape_coins(id) - get_pcvar_num(g_pCvarECoins))
- ze_colored_print(id, "You lost %i EC. :P", get_pcvar_num(g_pCvarECoins))
- }
- if (ze_get_user_xp(id) - get_pcvar_num(g_pCvarXP) <= 0)
- {
- ze_set_user_xp(id, 0)
- ze_colored_print(id, "You lost your XP. :P")
- }
- else
- {
- ze_set_user_xp(id, ze_get_user_xp(id) - get_pcvar_num(g_pCvarXP))
- ze_colored_print(id, "You lost %i XP. :P", get_pcvar_num(g_pCvarXP))
- }
- }
- }
- }
- }
He who fails to plan is planning to fail
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
I rewrote the code. Only forgot to bump.
6 days ago.
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
Still doesnt work properly, I lose xp and cois when I join game. Can you fix and test it? We need these for campers!
Post the current code your using here so we may see it.czirimbolo wrote: ↑5 years ago Still doesnt work properly, I lose xp and cois when I join game. Can you fix and test it? We need these for campers!
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
Code: Select all
#include <zombie_escape>
#include <ze_levels>
new g_pCvarXP, g_pCvarECoins
public plugin_init()
{
register_plugin("[ZE] Addons: Reduce on fail escape", "1.0", "Jack GamePlay")
g_pCvarECoins = register_cvar("ze_escapecoins", "1")
g_pCvarXP = register_cvar("ze_xp", "1")
}
public ze_roundend(Winner)
{
if (Winner == ZE_TEAM_HUMAN)
{
for (new id = 1; id <= get_member_game(m_nMaxPlayers); id++)
{
if (ze_is_user_zombie(id) || is_user_alive(id) || get_member(id, m_iTeam) != TEAM_SPECTATOR)
continue
if (ze_is_user_zombie(id) && is_user_alive(id))
{
if (ze_get_escape_coins(id) - get_pcvar_num(g_pCvarECoins) <= 0)
{
ze_set_escape_coins(id, 0)
ze_colored_print(id, "You lost your EC.")
}
else
{
ze_set_escape_coins(id, ze_get_escape_coins(id) - get_pcvar_num(g_pCvarECoins))
ze_colored_print(id, "You lost %i EC. :P", get_pcvar_num(g_pCvarECoins))
}
if (ze_get_user_xp(id) - get_pcvar_num(g_pCvarXP) <= 0)
{
ze_set_user_xp(id, 0)
ze_colored_print(id, "You lost your XP. :P")
}
else
{
ze_set_user_xp(id, ze_get_user_xp(id) - get_pcvar_num(g_pCvarXP))
ze_colored_print(id, "You lost %i XP. :P", get_pcvar_num(g_pCvarXP))
}
}
}
}
}
Ok, where's the working code ? or this plugin still under test.
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
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
Sign in
Who is online
Users browsing this forum: No registered users and 2 guests