Jump to content


Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Posted Image Posted Image

Guest Message by DevFuse
 

Zombie Escape V2: Shop (1.0.0 - 04.07.2014)


  • You cannot start a new topic
  • You cannot reply to this topic
No replies to this topic

#1 Adminek AMXX.PL

    Admin :)

  • Bot

  • Reputacja: 156
    Profesjonalista

  • Postów:7,515
  • Lokalizacja:AMXX.PL
Offline

Posted 04.07.2014 11:15

<p>

Zombie Escape V2: Shop
- v1.0.0, last updated : 04.07.2014

Zombie Escape V2: Shop is an Addon for Zombie Escape V2 which adds a Item Shop for both Humans and Zombies.

Requirements

Example Sub-Plugin


PHP Code:


/* Plugin generated by AMXX-Studio */

#include &lt;amxmodx&gt;
#include &lt;hamsandwich&gt;
#include &lt;fun&gt;
#include &lt;zev2_core&gt;
#include &lt;zev2_shop&gt;

#define PLUGIN "Zombie Escape V2: The Bloodthirster"
#define VERSION "1.0.0"
#define AUTHOR "Kia"

// ===============================================================================
// Editing begins here
// ===============================================================================

// Amount in Percent how much Life Steal you gain
#define LIFE_STEAL_PERCENT 4.0

// ===============================================================================
// and stops here. DO NOT MODIFY BELOW UNLESS YOU KNOW WHAT YOU'RE DOING
// ===============================================================================

// ===============================================================================
// Variables
// ===============================================================================

/* Boolean */
new bool:g_bHasLifeSteal[33]

// ===============================================================================
// plugin_init
// ===============================================================================

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

/* ZEV2 */
ZEV2_AddItem("The Bloodthirster", 1, 25, "ZEV2_OnItemBuy") // 1 = Humans; 2 = Zombies

/* Hamsandwich */
RegisterHam(Ham_TakeDamage, "player", "Ham_OnPlayerDamage")
}

// ===============================================================================
// ZEV2_OnItemBuy
// ===============================================================================

public ZEV2_OnItemBuy(id) g_bHasLifeSteal[id] = true

// ===============================================================================
// ZEV2_OnHumanInfected
// ===============================================================================

public ZEV2_OnHumanInfected(id) if(g_bHasLifeSteal[id]) g_bHasLifeSteal[id] = false

// ===============================================================================
// ZEV2_OnZombieWin
// ===============================================================================

public ZEV2_OnZombieWin() arrayset(g_bHasLifeSteal, 0, charsmax(g_bHasLifeSteal))

// ===============================================================================
// ZEV2_OnHumanWin
// ===============================================================================

public ZEV2_OnHumanWin() arrayset(g_bHasLifeSteal, 0, charsmax(g_bHasLifeSteal))

// ===============================================================================
// Ham_OnPlayerDamage
// ===============================================================================

public Ham_OnPlayerDamage(iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits)
{
if(
iInflictor == iAttacker &amp;&amp; is_user_alive(iAttacker) &amp;&amp; g_bHasLifeSteal[iAttacker])
set_user_health(iAttacker, floatround(get_user_health(iAttacker) + (fDamage / 100) * LIFE_STEAL_PERCENT))
}

Changelog


Quote:
Originally Posted by Version 1.0.0
Initial Release.



Attached Files Posted ImageGet Plugin or Get Source (zombie_escape_v2_shop.sma - 4.6 KB) Posted Imagezev2_shop.inc (361 Bytes)

Wyświetl pełny artykuł




  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

Coinsy CSGOPolygon Za SMS, PSC , Przelew - CoinSell.pro
Skiny do CS:GO za SMS, PSC, Przelew - CSGOPaka.com
Automatyczny Bot Levelowania Steam - LVLUPSteam.com
CSGO Gambling Sites and Free Betting Codes - DreamCodes.gg

Sign In