Jak ograniczyć kupno kamizelki w sklepie na zm do max 3 na rundę?
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.
|
Guest Message by DevFuse
1
jak ograniczyć kupno kevlaru na zm
Started By MruczeQ, 13.05.2016 15:07
8 replies to this topic
#1
Posted 13.05.2016 15:07
#2
Posted 13.05.2016 15:13
Max 3 razy kupić, czy maxymalnie 300 może mieć na sobie?
Nie dołączam do żadnej sieci, nie pomagam z tworzeniem paczek, nie napisze pluginów za zero.
#3
Posted 13.05.2016 18:39
Max 3 kupic
#5
Posted 21.05.2016 20:25
/*================================================================================
-------------------------------------------------
-*- [ZP] Extra Item: Anti-Infection Armor 1.0 -*-
-------------------------------------------------
~~~~~~~~~~~~~~~
- Description -
~~~~~~~~~~~~~~~
This item gives humans some armor that offers protection
against zombie injuries.
================================================================================*/
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
/*================================================================================
[Plugin Customization]
=================================================================================*/
const g_item_cost = 5
new const g_sound_buyarmor[] = { "items/tr_kevlar.wav" }
const g_armor_amount = 100
const g_armor_limit = 300
/*============================================================================*/
// Item IDs
new g_itemid_humanarmor
public plugin_precache()
{
precache_sound(g_sound_buyarmor)
}
public plugin_init()
{
register_plugin("[ZP] Extra: Anti-Infection Armor", "1.0", "MeRcyLeZZ")
g_itemid_humanarmor = zp_register_extra_item("ML_ARMOR", g_item_cost, ZP_TEAM_HUMAN)
register_dictionary("zombie_plague.txt")
}
// Human buys our upgrade, give him some armor
public zp_extra_item_selected(player, itemid)
{
if (itemid == g_itemid_humanarmor)
{
set_pev(player, pev_armorvalue, float(min(pev(player, pev_armorvalue)+g_armor_amount, g_armor_limit)))
engfunc(EngFunc_EmitSound, player, CHAN_BODY, g_sound_buyarmor, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
}
Edited by MruczeQ, 21.05.2016 20:26.
#6
Posted 29.05.2016 15:21
ref
#7
Posted 06.06.2016 14:22
ref
#8
Posted 06.06.2016 14:29
/*================================================================================ ------------------------------------------------- -*- [ZP] Extra Item: Anti-Infection Armor 1.0 -*- ------------------------------------------------- ~~~~~~~~~~~~~~~ - Description - ~~~~~~~~~~~~~~~ This item gives humans some armor that offers protection against zombie injuries. ================================================================================*/ #include <amxmodx> #include <fakemeta> #include <zombieplague> /*================================================================================ [Plugin Customization] =================================================================================*/ const g_item_cost = 5 new iBuyCount[33] const iMaxBuy = 3 new const g_sound_buyarmor[] = { "items/tr_kevlar.wav" } const g_armor_amount = 100 const g_armor_limit = 300 /*============================================================================*/ // Item IDs new g_itemid_humanarmor public plugin_precache() { precache_sound(g_sound_buyarmor) } public plugin_init() { register_plugin("[ZP] Extra: Anti-Infection Armor", "1.0", "MeRcyLeZZ") g_itemid_humanarmor = zp_register_extra_item("ML_ARMOR", g_item_cost, ZP_TEAM_HUMAN) register_event("HLTV", "event_round_start", "a", "1=0", "2=0") register_dictionary("zombie_plague.txt") } public zp_extra_item_selected(player, itemid) { if (itemid == g_itemid_humanarmor) { if(iBuyCount[player] >= iMaxBuy) { client_print(player, print_chat, "[ZP] Przepraszamy, ale juz nie mozesz tego kupowac!") return ZP_PLUGIN_HANDLED; } iBuyCount[player]++ set_pev(player, pev_armorvalue, float(min(pev(player, pev_armorvalue)+g_armor_amount, g_armor_limit))) engfunc(EngFunc_EmitSound, player, CHAN_BODY, g_sound_buyarmor, 1.0, ATTN_NORM, 0, PITCH_NORM) client_print(player, print_chat, "[ZP] Kupiles KAMIZELKE!") } return PLUGIN_CONTINUE; } public event_round_start() for(new i = 1; i <= 33; i++) iBuyCount[i] = 0
Wykonam pluginy, paczki (amxx) kontakt GG: 32263742, Steam: https://steamcommuni...om/id/vankillah
#9
Posted 22.06.2016 21:50
Mam już inny plugin. Można zamknąć, a wszystkim dziękuję za pomoc.