Raised This Month: $ Target: $400
 0% 

The problem of gas mask


Post New Thread Reply   
 
Thread Tools Display Modes
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-19-2013 , 00:50   Re: The problem of gas mask
Reply With Quote #11

Quote:
Originally Posted by gregorio99 View Post
if they could let me someone who complicates the sma file. and AMX and I would be very grateful because they simply do not work for me where it gets complicated mobile site files
Please i request you to use Google translate or atleast post in multilingual section if u dont know proper english, i cant understand half the stuff u write :\
__________________
You will find everything u need :-
Catastrophe is offline
gregorio99
Member
Join Date: Jun 2013
Old 06-19-2013 , 02:21   Re: The problem of gas mask
Reply With Quote #12

What I mean is that the code that you gave me the above does not work at all in either version 4.3 or 5.0 and you can immediately make me ready files to the server fried AMX and I would greatly appreciate it properly and well-written the plugin
gregorio99 is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-19-2013 , 02:25   Re: The problem of gas mask
Reply With Quote #13

The code i gave you works 100% i already tested it, that means there is smthing wrong with your server + I dont code for zp43
__________________
You will find everything u need :-
Catastrophe is offline
gregorio99
Member
Join Date: Jun 2013
Old 06-19-2013 , 03:56   Re: The problem of gas mask
Reply With Quote #14

you can do me right away amx file? I do not know whether I did the complications I'd asked I would have immediately checked on the server zp 4.3 100% of other plugins work
gregorio99 is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-19-2013 , 04:33   Re: The problem of gas mask
Reply With Quote #15

Here
Attached Files
File Type: amxx azp_test.amxx (3.4 KB, 35 views)
__________________
You will find everything u need :-
Catastrophe is offline
gregorio99
Member
Join Date: Jun 2013
Old 06-19-2013 , 05:59   Re: The problem of gas mask
Reply With Quote #16

mask has been running at 4.3 but the problem that such as throw one bomb and it works as I throw two bomb is already infecting my point here is that the mask was the entire round as you would have it he could fix me and I would be very grateful
gregorio99 is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-19-2013 , 06:00   Re: The problem of gas mask
Reply With Quote #17

sure, but w8 a few hours, i'll have to go smwhere now....
__________________
You will find everything u need :-
Catastrophe is offline
gregorio99
Member
Join Date: Jun 2013
Old 06-19-2013 , 06:07   Re: The problem of gas mask
Reply With Quote #18

ok no hurry me out of this and you are able to do this? the entire round?
gregorio99 is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-19-2013 , 12:06   Re: The problem of gas mask
Reply With Quote #19

Here:- untested but shud work :-

PHP Code:
/*

                           [ZP] Anti Infect Bomb 
                            - other name - 
                               Gas Mask

    Description: 
    [   Removes bombs that is thrown at zombie        ] 
    [   (it will remove everything in range of 150)   ]

    Credits to : 
    [     AmineKyo     ]
    [    Nick Haldem   ]
    [     Excalibur    ]
    [      micapat     ]
    [       Y060N      ]
    
    Version : 
    [2.1 - Final modifying]
*/

#include < amxmodx >
#include < hamsandwich >
#include < engine >
#include < zombieplague >

#define _PLUGIN   "[ZP] Extra item: Gas Mask"
#define _VERSION             "2.1"
#define _AUTHOR           "H.RED.ZONE"

#define _MarkPlayerInMask(%0)   _bitPlayerInMask |= (1 << (%0 & 31))
#define _ClearPlayerInMask(%0)  _bitPlayerInMask &= ~(1 << (%0 & 31))
#define _IsPlayerInMask(%0)     _bitPlayerInMask & (1 << (%0 & 31))

#define _MarkPlayerConnected(%0)  _bitPlayerConnected |= (1 << (%0 & 31))
#define _ClearPlayerConnected(%0) _bitPlayerConnected &= ~(1 << (%0 & 31))
#define _IsPlayerConnected(%0)    _bitPlayerConnected & (1 << (%0 & 31))

#define _MarkPlayerAlive(%0)  _bitPlayerAlive |= (1 << (%0 & 31))
#define _ClearPlayerAlive(%0) _bitPlayerAlive &= ~(1 << (%0 & 31))
#define _IsPlayerAlive(%0)    _bitPlayerAlive & (1 << (%0 & 31))

#define EV_INT_nadetype     EV_INT_flTimeStepSound
#define NADETYPE_INFECTION  1111 

#define COST   20           // Item Cost

new g_itemid_buyremoverh
new g_icon 

new _pcvar_range
    
,_pcvar_after_remove
    
,_pcvar_prefix
    
new _bitPlayerInMask
    
,_bitPlayerAlive
    
,_bitPlayerConnected

new g_MsgSayText
    
,g_MaxPlayers    
    
new const plr_command[][] = {
    
"say /mask",
    
"say_team /mask"    
}    
    
public 
plugin_init() {
    
register_plugin"[ZP] Extra item: Gas Mask""2.1""H.RED.ZONE" )
    
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn")
    
RegisterHam(Ham_Think"grenade""fw_ThinkGrenade"1)
    
    
g_itemid_buyremoverh zp_register_extra_item("Gas Mask" COST ZP_TEAM_HUMAN )
    
    
register_event"HLTV""NewRound""a""1=0""2=0" )
  
    for ( new 
IndexIndex sizeof plr_commandIndex++)
        
register_clcmd(plr_command[Index], "buy_mask")
  
    
_pcvar_range register_cvar"zp_gas_remover_range""200" )
    
_pcvar_after_remove register_cvar"zp_gas_remover_after""0" )
    
_pcvar_prefix register_cvar("zp_gas_mask_prefix""Mask"00.0)
    
    
g_MsgSayText get_user_msgid("SayText");
    
g_MaxPlayers get_maxplayers()
    
g_icon get_user_msgid("StatusIcon"
}

public 
zp_extra_item_selectedplritemid ) {
    if ( 
itemid == g_itemid_buyremoverh ) {
        if( ~
_IsPlayerInMaskplr ) ) {
            
_MarkPlayerInMaskplr )
            
ProtoChat(plr"You now have Gas Mask.")
            
            
Icon_On(plr)
        }    
    }
}

public 
buy_mask(id) {
    new 
ammopacks zp_get_user_ammo_packs(id)
    
    if( 
_IsPlayerInMaskid ) ) {
        
ProtoChat(id"You have Gas Mask.")
    }
    else if( 
ammopacks COST) {
        
_MarkPlayerInMask(id)
        
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) - COST);
    }
    else {
        
ProtoChat(id"You can't buy mask now.")
    }    
}

public 
fw_ThinkGrenadeentity ) {
    if( 
is_valid_ententity ) && entity_get_intentityEV_INT_nadetype ) == NADETYPE_INFECTION  ) { 
        new 
_cvar_range get_pcvar_num_pcvar_range 
        new 
_cvar_after_remove get_pcvar_num_pcvar_after_remove )
        
        for( new 
id id <= g_MaxPlayers id++ ) {
            if( 
_IsPlayerAliveid ) && _IsPlayerInMaskid )) {
                            if( 
get_entity_distanceentityid ) <= _cvar_range ) {
                                
remove_entityentity )
                        
                                if( 
_cvar_after_remove ) {
                                        
_ClearPlayerInMaskid )
                            
                                        
Icon_Off(id)    
                                        
ProtoChat(id"Infect nade is removed, you don't have mask anymore.")
                                }
                            }
                    }
                }
        }
    return 
HAM_IGNORED;
}  

public 
NewRound() {
    
_bitPlayerInMask 0
}

public 
client_connectplr ) {
    
_MarkPlayerConnectedplr )    
}

public 
client_disconnectplr ) {
    
_ClearPlayerConnectedplr )
    
Icon_Offplr )    
}

public 
zp_user_infected_postid ) {
    
_ClearPlayerInMaskid )
    
Icon_Offid )    
}

public 
zp_user_infected_preid ) {
    
_ClearPlayerInMaskid )
    
Icon_Offid )    


public 
Icon_On(plr) {
    
message_beginMSG_ONE_UNRELIABLEg_icon, { 00}, plr );
    
write_byte);
    
write_string"dmg_gas" );
    
write_byte);
    
write_byte255 );
    
write_byte);
    
message_end( );
}
    
public 
Icon_Off(plr) {
    
message_beginMSG_ONE_UNRELIABLEg_icon, { 00}, plr );
    
write_byte);
    
write_string"dmg_gas" );
    
write_byte);
    
write_byte255 );
    
write_byte);
    
message_end( );
}
    
public 
fw_PlayerKilled(plrattackershouldgib) {
    if(
_IsPlayerConnected(plr)) {
        
_ClearPlayerAlive(plr)
    }
}

public 
fw_PlayerSpawn(plr) {
    if(
_IsPlayerConnected(plr)) {
        
_MarkPlayerAlive(plr)
    }
}

ProtoChat (plr, const sFormat[], any:...) {
    static 
iplr plr get_player();
    if ( !
) {
        return 
PLUGIN_HANDLED;
    }
    
    new 
sPrefix[16];
    
get_pcvar_string(_pcvar_prefixsPrefix15);
    
    new 
sMessage[256];
    new 
len formatex(sMessage255"^x01[^x04%s^x01] "sPrefix);
    
vformat(sMessage[len], 255-lensFormat3)
    
sMessage[192] = '^0' 
    
    
Make_SayText(plrisMessage)
    
    return 
PLUGIN_CONTINUE;
}

get_player() {
    for ( new 
plrplr <= g_MaxPlayersplr++) {
        if (
_IsPlayerConnected(plr)) {
            return 
plr;
        }
    }
    return 
PLUGIN_HANDLED
}

Make_SayText(ReceiverSendersMessage[]) {
    if (!
Sender) {
        return 
PLUGIN_HANDLED;
    }
    
message_begin(Receiver MSG_ONE_UNRELIABLE MSG_ALLg_MsgSayText, {0,0,0}, Receiver)
    
write_byte(Sender)
    
write_string(sMessage)
    
message_end()
    
    return 
PLUGIN_CONTINUE;
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang10266\\ f0\\ fs16 \n\\ par }
*/ 
__________________
You will find everything u need :-
Catastrophe is offline
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 06-19-2013 , 12:20   Re: The problem of gas mask
Reply With Quote #20

Just change this cvar to 0: _pcvar_after_remove = register_cvar( "zp_gas_remover_after", "0" )
wicho is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode