Zumbis Online
Últimos assuntos
» [NPC] Jack Boss [Full Skills]
por [Dk]Serial-Killer 13/7/2018, 1:05 am

» [ZP] Register + Login (HUD CUSTOM) - UPDATE
por zgd.dll 6/7/2018, 2:24 am

» [NPC] Jack Boss [BETA]
por [Dk]Serial-Killer 4/7/2018, 11:31 pm

» hud icon position
por [Dk]Serial-Killer 4/7/2018, 3:48 pm

» [NPC]boss Dione V2
por [Dk]Serial-Killer 30/6/2018, 4:50 pm

» [ZP] Register + Login Custom
por [Dk]Serial-Killer 25/6/2018, 9:00 pm

» [ZP] Novo modelo de ajudante do primeiro zombie
por cancels 24/6/2018, 7:57 pm

» MENU H
por cancels 23/6/2018, 7:07 pm

» [PEDIDO] Bloqueando M2 no ZP 5.0
por cancels 12/6/2018, 6:06 pm

» [NPC] Light Zombie (REBOOT Beta)
por cancels 10/6/2018, 1:36 pm

Frases filosóficas Zplague:
....
Os membros mais ativos da semana

Adsense

[PEDIDO] Limite de madness ZP50

Ir em baixo

[PEDIDO] Limite de madness ZP50

Mensagem por cancels em 9/9/2017, 5:38 pm

Olá pessoal queria uma ajuda de algum de vocês para fazer a redução do linite de uso do madness do ZP50,
ja tentei usar alguns plugin a parte e outros madness mais nao funcionou queria ver se há possibilidade de limitar ela para uso  2 madness por player em cada round e ter uma contagem de quantos ele usou e de quantos falta.

e reduzir a quantidade de uso de antidote, player pode usar 1 por round.

 anti dote em .sma
Código:
/*================================================================================
   
   ---------------------------
   -*- [ZP] Item: Antidote -*-
   ---------------------------
   
   This plugin is part of Zombie Plague Mod and is distributed under the
   terms of the GNU General Public License. Check ZP_ReadMe.txt for details.
   
================================================================================*/

#define ITEM_NAME "Antidote"
#define ITEM_COST 15

#include <amxmodx>
#include <zp50_items>
#include <zp50_gamemodes>

new g_ItemID
new g_GameModeInfectionID
new g_GameModeMultiID
new cvar_deathmatch, cvar_respawn_after_last_human
new g_AntidotesTaken, cvar_antidote_round_limit

public plugin_init()
{
   register_plugin("[ZP] Item: Antidote", ZP_VERSION_STRING, "ZP Dev Team")
   
   register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
   
   g_ItemID = zp_items_register(ITEM_NAME, ITEM_COST)
   cvar_antidote_round_limit = register_cvar("zp_antidote_round_limit", "5")
}

public plugin_cfg()
{
   g_GameModeInfectionID = zp_gamemodes_get_id("Infection Mode")
   g_GameModeMultiID = zp_gamemodes_get_id("Multiple Infection Mode")
   cvar_deathmatch = get_cvar_pointer("zp_deathmatch")
   cvar_respawn_after_last_human = get_cvar_pointer("zp_respawn_after_last_human")
}

public event_round_start()
{
   g_AntidotesTaken = 0
}

public zp_fw_items_select_pre(id, itemid, ignorecost)
{
   // This is not our item
   if (itemid != g_ItemID)
      return ZP_ITEM_AVAILABLE;
   
   // Antidote only available during infection modes
   new current_mode = zp_gamemodes_get_current()
   if (current_mode != g_GameModeInfectionID && current_mode != g_GameModeMultiID)
      return ZP_ITEM_DONT_SHOW;
   
   // Antidote only available to zombies
   if (!zp_core_is_zombie(id))
      return ZP_ITEM_DONT_SHOW;
   
   // Display remaining item count for this round
   static text[32]
   formatex(text, charsmax(text), "[%d/%d]", g_AntidotesTaken, get_pcvar_num(cvar_antidote_round_limit))
   zp_items_menu_text_add(text)
   
   // Antidote not available to last zombie
   if (zp_core_get_zombie_count() == 1)
      return ZP_ITEM_NOT_AVAILABLE;
   
   // Deathmatch mode enabled, respawn after last human disabled, and only one human left
   if (cvar_deathmatch && get_pcvar_num(cvar_deathmatch) && cvar_respawn_after_last_human
   && !get_pcvar_num(cvar_respawn_after_last_human) && zp_core_get_human_count() == 1)
      return ZP_ITEM_NOT_AVAILABLE;
   
   // Reached antidote limit for this round
   if (g_AntidotesTaken >= get_pcvar_num(cvar_antidote_round_limit))
      return ZP_ITEM_NOT_AVAILABLE;
   
   return ZP_ITEM_AVAILABLE;
}

public zp_fw_items_select_post(id, itemid, ignorecost)
{
   // This is not our item
   if (itemid != g_ItemID)
      return;
   
   // Make player cure himself
   zp_core_cure(id, id)
   g_AntidotesTaken++
}

zombie madness
Código:
/*================================================================================
   
   ---------------------------
   -*- [ZP] Item: Antidote -*-
   ---------------------------
   
   This plugin is part of Zombie Plague Mod and is distributed under the
   terms of the GNU General Public License. Check ZP_ReadMe.txt for details.
   
================================================================================*/

#define ITEM_NAME "Antidote"
#define ITEM_COST 15

#include <amxmodx>
#include <zp50_items>
#include <zp50_gamemodes>

new g_ItemID
new g_GameModeInfectionID
new g_GameModeMultiID
new cvar_deathmatch, cvar_respawn_after_last_human
new g_AntidotesTaken, cvar_antidote_round_limit

public plugin_init()
{
   register_plugin("[ZP] Item: Antidote", ZP_VERSION_STRING, "ZP Dev Team")
   
   register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
   
   g_ItemID = zp_items_register(ITEM_NAME, ITEM_COST)
   cvar_antidote_round_limit = register_cvar("zp_antidote_round_limit", "5")
}

public plugin_cfg()
{
   g_GameModeInfectionID = zp_gamemodes_get_id("Infection Mode")
   g_GameModeMultiID = zp_gamemodes_get_id("Multiple Infection Mode")
   cvar_deathmatch = get_cvar_pointer("zp_deathmatch")
   cvar_respawn_after_last_human = get_cvar_pointer("zp_respawn_after_last_human")
}

public event_round_start()
{
   g_AntidotesTaken = 0
}

public zp_fw_items_select_pre(id, itemid, ignorecost)
{
   // This is not our item
   if (itemid != g_ItemID)
      return ZP_ITEM_AVAILABLE;
   
   // Antidote only available during infection modes
   new current_mode = zp_gamemodes_get_current()
   if (current_mode != g_GameModeInfectionID && current_mode != g_GameModeMultiID)
      return ZP_ITEM_DONT_SHOW;
   
   // Antidote only available to zombies
   if (!zp_core_is_zombie(id))
      return ZP_ITEM_DONT_SHOW;
   
   // Display remaining item count for this round
   static text[32]
   formatex(text, charsmax(text), "[%d/%d]", g_AntidotesTaken, get_pcvar_num(cvar_antidote_round_limit))
   zp_items_menu_text_add(text)
   
   // Antidote not available to last zombie
   if (zp_core_get_zombie_count() == 1)
      return ZP_ITEM_NOT_AVAILABLE;
   
   // Deathmatch mode enabled, respawn after last human disabled, and only one human left
   if (cvar_deathmatch && get_pcvar_num(cvar_deathmatch) && cvar_respawn_after_last_human
   && !get_pcvar_num(cvar_respawn_after_last_human) && zp_core_get_human_count() == 1)
      return ZP_ITEM_NOT_AVAILABLE;
   
   // Reached antidote limit for this round
   if (g_AntidotesTaken >= get_pcvar_num(cvar_antidote_round_limit))
      return ZP_ITEM_NOT_AVAILABLE;
   
   return ZP_ITEM_AVAILABLE;
}

public zp_fw_items_select_post(id, itemid, ignorecost)
{
   // This is not our item
   if (itemid != g_ItemID)
      return;
   
   // Make player cure himself
   zp_core_cure(id, id)
   g_AntidotesTaken++
}
avatar
cancels
Humano
Humano

Nick : ByVodka
Masculino Número de Mensagens : 66
Woow!!
Ammo Packs : 399
Honra : 1
Data de inscrição : 24/06/2017

Ver perfil do usuário http://steamcommunity.com/id/IByVodka/ thallescintra

Voltar ao Topo Ir em baixo

Voltar ao Topo


 
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum