|
CS1.BG | DUST2 NOSHTA GARMI [RANKED PLAY] #1 45.144.155.113:27015 |
de_dust2 Играчи: 30/32 |
VIP
|
Cs-PlovdiV.com - Aim Attack | 93.123.16.4:27022 | aim_aztec | Играчи: 0/16 |
|
VIP
|
93.123.16.4:27022 | Cs-PlovdiV.com - Aim Attack | aim_aztec | 0/16 |
Only 1 HE Bomb per Round
-
Infamous2018
Извън линия - Foreigner
- Мнения: 522
- Регистриран на: 08 Апр 2018, 16:56
- Се отблагодари: 14 пъти
- Получена благодарност: 21 пъти
Only 1 HE Bomb per Round
Hello, can anyone create an Plugin that an Player is allowed only to use ONE HE Bomb per Round? need it for my Poolday Server. It would be great. THX
Maybe that they get an message like: "You are allowed to use only 1 Bomb per Round"
Maybe that they get an message like: "You are allowed to use only 1 Bomb per Round"
-
blazz3rzbg
Извън линия - Потребител
- Мнения: 50
- Регистриран на: 22 Фев 2019, 14:38
- Местоположение: Стара Загора
- Се отблагодари: 12 пъти
- Получена благодарност: 16 пъти
Only 1 HE Bomb per Round
Have you searched ? You can simply try this https://forums.alliedmods.net/showthread.php?t=179443
-
Infamous2018
Извън линия - Foreigner
- Мнения: 522
- Регистриран на: 08 Апр 2018, 16:56
- Се отблагодари: 14 пъти
- Получена благодарност: 21 пъти
Only 1 HE Bomb per Round
This Link blocks only the Buying Bombs. But poolday have in Pool multiple Bombs. Thats the reason why i am searching an Plugin who allow only one bomb per round.
Добавено преди 46 минути 52 секунди:
i tested ur link and it dont work.
Добавено преди 46 минути 52 секунди:
i tested ur link and it dont work.
-
OciXCrom
Извън линия - Owner
- Мнения: 7206
- Регистриран на: 06 Окт 2016, 19:20
- Местоположение: /resetscore
- Се отблагодари: 117 пъти
- Получена благодарност: 1296 пъти
- Обратна връзка:
Only 1 HE Bomb per Round
Код за потвърждение: Избери целия код
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define m_pPlayer 41
#define m_flNextPrimaryAttack 46
#define XO_WEAPON 4
new const GRENADE_LIMIT = 1
new g_iThrownGrenades[33]
public plugin_init()
{
register_plugin("HE Grenade Limit", "1.0", "OciXCrom")
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_hegrenade", "PreThrowHe", 0)
register_logevent("OnRoundStart", 2, "0=World triggered", "1=Round_Start")
}
public client_putinserver(id)
reset_limit(id)
public OnRoundStart()
{
arrayset(g_iThrownGrenades, 0, sizeof(g_iThrownGrenades))
}
public PreThrowHe(iWeapon)
{
new id = get_pdata_cbase(iWeapon, m_pPlayer, XO_WEAPON)
if(g_iThrownGrenades[id]++ >= GRENADE_LIMIT)
{
client_print(id, print_center, "You can throw only %i HE grenade per spawn", GRENADE_LIMIT)
set_pdata_float(iWeapon, m_flNextPrimaryAttack, 1.0, XO_WEAPON)
return HAM_SUPERCEDE
}
return HAM_IGNORED
}
reset_limit(id)
g_iThrownGrenades[id] = 0
-
blazz3rzbg
Извън линия - Потребител
- Мнения: 50
- Регистриран на: 22 Фев 2019, 14:38
- Местоположение: Стара Загора
- Се отблагодари: 12 пъти
- Получена благодарност: 16 пъти
Only 1 HE Bomb per Round
sizeof(g_iThrownGrenades) ? ? ?OciXCrom написа: ↑20 Май 2019, 02:12Код за потвърждение: Избери целия код
#include <amxmodx> #include <fakemeta> #include <hamsandwich> #define m_pPlayer 41 #define m_flNextPrimaryAttack 46 #define XO_WEAPON 4 new const GRENADE_LIMIT = 1 new g_iThrownGrenades[33] public plugin_init() { register_plugin("HE Grenade Limit", "1.0", "OciXCrom @ Skype") RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_hegrenade", "PreThrowHe", 0) register_logevent("OnRoundStart", 2, "0=World triggered", "1=Round_Start") } public client_putinserver(id) reset_limit(id) public OnRoundStart() { arrayset(g_iThrownGrenades, 0, sizeof(g_iThrownGrenades)) } public PreThrowHe(iWeapon) { new id = get_pdata_cbase(iWeapon, m_pPlayer, XO_WEAPON) if(g_iThrownGrenades[id] == GRENADE_LIMIT) { client_print(id, print_center, "You can throw only %i HE grenade per spawn", GRENADE_LIMIT) set_pdata_float(iWeapon, m_flNextPrimaryAttack, 1.0, XO_WEAPON) return HAM_SUPERCEDE } return HAM_IGNORED } reset_limit(id) g_iThrownGrenades[id] = 0
I think it should be
sizeof g_iThrownGrenades
Not a big deal but I think its more correct that way.
-
OciXCrom
Извън линия - Owner
- Мнения: 7206
- Регистриран на: 06 Окт 2016, 19:20
- Местоположение: /resetscore
- Се отблагодари: 117 пъти
- Получена благодарност: 1296 пъти
- Обратна връзка:
Only 1 HE Bomb per Round
It's the same thing. You can even do:
register_plugin "HE Grenade Limit", "1.0", "OciXCrom"
... clearly we aren't using this "style" anywhere, so why should we do it with sizeof? Brackets in functions are optional.
register_plugin "HE Grenade Limit", "1.0", "OciXCrom"
... clearly we aren't using this "style" anywhere, so why should we do it with sizeof? Brackets in functions are optional.
-
blazz3rzbg
Извън линия - Потребител
- Мнения: 50
- Регистриран на: 22 Фев 2019, 14:38
- Местоположение: Стара Загора
- Се отблагодари: 12 пъти
- Получена благодарност: 16 пъти
Only 1 HE Bomb per Round
As I know sizeof isnt a function so () will work fine but without brackets is more correct.
Depends on your style as you said.. Just wanted to mention it.
-
OciXCrom
Извън линия - Owner
- Мнения: 7206
- Регистриран на: 06 Окт 2016, 19:20
- Местоположение: /resetscore
- Се отблагодари: 117 пъти
- Получена благодарност: 1296 пъти
- Обратна връзка:
Only 1 HE Bomb per Round
It is a function, but not from AMXX itself. It's the same as if, for and the other ones. But yeah, it doesn't really matter as it's just my prefered style.
-
Infamous2018
Извън линия - Foreigner
- Мнения: 522
- Регистриран на: 08 Апр 2018, 16:56
- Се отблагодари: 14 пъти
- Получена благодарност: 21 пъти
Only 1 HE Bomb per Round
THX - I will test the Plugin and let u know if works or not.
This one dont work. When i jump in the pool i can use all bombs one by one
Код за потвърждение: Избери целия код
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define m_pPlayer 41
#define m_flNextPrimaryAttack 46
#define XO_WEAPON 4
new const GRENADE_LIMIT = 1
new g_iThrownGrenades[33]
public plugin_init()
{
register_plugin("HE Grenade Limit", "1.0", "OciXCrom @ Skype")
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_hegrenade", "PreThrowHe", 0)
register_logevent("OnRoundStart", 2, "0=World triggered", "1=Round_Start")
}
public client_putinserver(id)
reset_limit(id)
public OnRoundStart()
{
arrayset(g_iThrownGrenades, 0, sizeof(g_iThrownGrenades))
}
public PreThrowHe(iWeapon)
{
new id = get_pdata_cbase(iWeapon, m_pPlayer, XO_WEAPON)
if(g_iThrownGrenades[id] == GRENADE_LIMIT)
{
client_print(id, print_center, "You can throw only %i HE grenade per spawn", GRENADE_LIMIT)
set_pdata_float(iWeapon, m_flNextPrimaryAttack, 1.0, XO_WEAPON)
return HAM_SUPERCEDE
}
return HAM_IGNORED
}
reset_limit(id)
g_iThrownGrenades[id] = 0
-
- Подобни теми
- Отговори
- Преглеждания
- Последно мнение
-
- 1 Отговори
- 416 Преглеждания
-
Последно мнение от TryAgain
-
- 1 Отговори
- 507 Преглеждания
-
Последно мнение от Hurricane
-
- 1 Отговори
- 1552 Преглеждания
-
Последно мнение от OciXCrom
-
- 4 Отговори
- 1640 Преглеждания
-
Последно мнение от xydojke
-
- 0 Отговори
- 1011 Преглеждания
-
Последно мнение от Taliban
-
- 1 Отговори
- 274 Преглеждания
-
Последно мнение от Stilex
-
- 0 Отговори
- 1292 Преглеждания
-
Последно мнение от Mighty
Кой е на линия
Потребители разглеждащи този форум: 0 регистрирани и 1 гост