Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
[ Plugin ] Grenades Block [ Versiunea 1.0 ]
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Resources
Author
Message
783
alex53
[Mentally Stable]
Status: Offline
(since 15-04-2014 12:18)
Joined: 26 Dec 2012
Posts: 9
,
Topics: 8
Location:
Romania
Reputation:
55.3
Votes
: 2
Posted: 15-04-2014, 09:51:04
| Translate post to:
... (
Click for more languages
)
Descriere: Deoarece am primit multe cereri am facut acest plugin de nades block. Dupa ce bomba a fost plantata blocheaza grenazile(he/fb/sg prin cvar) in zona bombei sau pe toata mapa(tot prin cvar).
Descarcare:
http://www.girlshare.ro/33474051.6
Sursa:
Spoiler:
Code:
#include < amxmodx >
#include < amxmisc >
#include < hamsandwich >
#include < csx >
#include <
cstrike
>
#define PLUGIN "HE Block"
#define VERSION "1.0"
#define AUTHOR "HamletEagle"
new bool: Block
const XO_WEAPON = 4
const m_pPlayer = 41
const m_flNextPrimaryAttack = 46
new bomb_zone
new g_grenades [ 4 ]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_hegrenade" , "Check_He_Grenade")
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_flashbang" , "Check_FB_Grenade")
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_smokegrenade" , "Check_SG_Grenade")
bomb_zone = register_cvar ( "block_bomb_zone" , "1" )
g_grenades [ 1 ] = register_cvar ( "he_allow" , "1")
g_grenades [ 2 ] = register_cvar ( "fb_allow" , "1")
g_grenades [ 3 ] = register_cvar ( "sg_allow" , "1")
}
public Check_He_Grenade ( grenadeIndex ) {
new id = get_pdata_cbase(grenadeIndex, m_pPlayer, XO_WEAPON)
if ( Block == true ) {
if( get_pcvar_num ( g_grenades [ 1 ] ) == 1 ) {
if ( get_pcvar_num ( bomb_zone ) == 1 ) {
if (cs_get_user_mapzones(id) == CS_MAPZONE_BOMBTARGET ) {
cs_set_user_plant(id,1,0)
return HAM_SUPERCEDE
}
else {
cs_set_user_plant(id,1,0)
return HAM_IGNORED
}
}
else
return HAM_SUPERCEDE
}
else return HAM_IGNORED
}
return HAM_IGNORED
}
public Check_FB_Grenade ( grenadeIndex ) {
new id = get_pdata_cbase(grenadeIndex, m_pPlayer, XO_WEAPON)
if ( Block == true ) {
if( get_pcvar_num ( g_grenades [ 2 ] ) == 1 ) {
if ( get_pcvar_num ( bomb_zone ) == 1 ) {
if (cs_get_user_mapzones(id) == CS_MAPZONE_BOMBTARGET ) {
cs_set_user_plant(id,1,0)
return HAM_SUPERCEDE
}
else {
cs_set_user_plant(id,1,0)
return HAM_IGNORED
}
}
else
return HAM_SUPERCEDE
}
else return HAM_IGNORED
}
return HAM_IGNORED
}
public Check_SG_Grenade ( grenadeIndex ) {
new id = get_pdata_cbase(grenadeIndex, m_pPlayer, XO_WEAPON)
if ( Block == true ) {
if( get_pcvar_num ( g_grenades [ 3 ] ) == 1 ) {
if ( get_pcvar_num ( bomb_zone ) == 1 ) {
if (cs_get_user_mapzones(id) == CS_MAPZONE_BOMBTARGET ) {
cs_set_user_plant(id,1,0)
return HAM_SUPERCEDE
}
else {
cs_set_user_plant(id,1,0)
return HAM_IGNORED
}
}
else
return HAM_SUPERCEDE
}
else return HAM_IGNORED
}
return HAM_IGNORED
}
public bomb_planted() {
Block = true
new iPlayers[ 32 ], iNum, index
get_players( iPlayers, iNum )
for ( new i = 0; i < iNum; i++ )
{
index= iPlayers[ i ];
if( get_pcvar_num ( bomb_zone ) == 1 )
cs_set_user_plant(index,1,0)
}
}
public bomb_explode()
Block = false
public bomb_defused()
Block = false
Nume: Nades Block
Versiune: 1.0
Autor: HamletEagle
Instalare:
1. Fisierul nades_block.sma il puneti in addons/amxmodx/scripting
2. Fisierul nades_block.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Code:
nades_block.amxx
Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
block_bomb_zone 1/0-grenazi blocate doar in zona bombei/toata mapa
he_allow 1/0 - 1: blocheaza 0: permite
fb_allow 1/0 -1: blocheaza 0: permite
sg_allow 1/0 -1: blocheaza 0: permite
Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator):
Nu contine comenzi administrative.
Comenzi publice (se tasteaza in joc prin apasarea tastei Y):
Nu contine comenzi publice.
Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
Code:
hamsandwich
csx
cstrike
Imagini:
Nu am ce imagini sa pun.
0
0
Back to top
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Resources
The time now is 29-07-2025, 19:54:07
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details