Raised This Month: $ Target: $400
 0% 

Usp con silenciador.


  
 
 
Thread Tools Display Modes
Author Message
Marcelo21
Member
Join Date: Mar 2010
Location: Argentina
Old 11-26-2011 , 03:03   Usp con silenciador.
#1

Como hago para que la usp se use solo con silenciador?
Marcelo21 is offline
Send a message via MSN to Marcelo21 Send a message via Skype™ to Marcelo21
Oxford
Member
Join Date: Sep 2011
Old 11-26-2011 , 05:42   Re: Usp con silenciador.
#2

y que senido tiene?
__________________
Oxford is offline
niqo
Senior Member
Join Date: Feb 2010
Location: Argentina
Old 11-26-2011 , 05:49   Re: Usp con silenciador.
#3

PHP Code:
/*    Formatright © 2010, ConnorMcLeod 

    Silenced Usp is free software; 
    you can redistribute it and/or modify it under the terms of the 
    GNU General Public License as published by the Free Software Foundation. 

    This program is distributed in the hope that it will be useful, 
    but WITHOUT ANY WARRANTY; without even the implied warranty of 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    GNU General Public License for more details. 

    You should have received a copy of the GNU General Public License 
    along with Silenced Usp; if not, write to the 
    Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
    Boston, MA 02111-1307, USA. 
*/ 

#include <amxmodx> 
#include <engine> 
#include <fakemeta> 
#include <hamsandwich> 

new const VERSION[] = "0.0.1" 

#define    EXTRAOFFSET_WEAPONS            4 
#define    m_pPlayer                    41 
#define    m_flNextSecondaryAttack        47 
#define    OFFSET_SILENCER_FIREMODE        74 
const    USP_SILENCED            =    (1<<0

#define set_usp_silent(%1)    set_pdata_int(%1, OFFSET_SILENCER_FIREMODE, USP_SILENCED, EXTRAOFFSET_WEAPONS) 
#define get_weapon_owner(%1)    get_pdata_cbase(%1, m_pPlayer, EXTRAOFFSET_WEAPONS) 

public plugin_init() 

    
register_plugin("Silenced Usp"VERSION"ConnorMcLeod"

    
RegisterHam(Ham_Item_Deploy"weapon_usp""Usp_Deploy"1
    
RegisterHam(Ham_Weapon_SecondaryAttack"weapon_usp""Usp_SecondaryAttack"1


public 
Usp_Deploy(iEnt

    
set_usp_silent(iEnt
    
SendWeaponAnimget_weapon_owner(iEnt) , 6


public 
Usp_SecondaryAttack(iEnt

    
set_usp_silent(iEnt
    
SendWeaponAnimget_weapon_owner(iEnt) , 0

    
set_pdata_float(iEntm_flNextSecondaryAttack9999.9EXTRAOFFSET_WEAPONS


SendWeaponAnim(idiAnim

    
entity_set_int(idEV_INT_weaponanimiAnim

    
message_begin(MSG_ONESVC_WEAPONANIM_id
    
write_byte(iAnim
    
write_byte(entity_get_int(idEV_INT_body)) 
    
message_end() 

__________________
niqo is offline
Marcelo21
Member
Join Date: Mar 2010
Location: Argentina
Old 11-26-2011 , 11:09   Re: Usp con silenciador.
#4

Quote:
Originally Posted by Oxford View Post
y que senido tiene?
Lo quiero usar para un deathrun.

Quote:
Originally Posted by niqo View Post
PHP Code:
/*    Formatright © 2010, ConnorMcLeod 

    Silenced Usp is free software; 
    you can redistribute it and/or modify it under the terms of the 
    GNU General Public License as published by the Free Software Foundation. 

    This program is distributed in the hope that it will be useful, 
    but WITHOUT ANY WARRANTY; without even the implied warranty of 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    GNU General Public License for more details. 

    You should have received a copy of the GNU General Public License 
    along with Silenced Usp; if not, write to the 
    Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
    Boston, MA 02111-1307, USA. 
*/ 

#include <amxmodx> 
#include <engine> 
#include <fakemeta> 
#include <hamsandwich> 

new const VERSION[] = "0.0.1" 

#define    EXTRAOFFSET_WEAPONS            4 
#define    m_pPlayer                    41 
#define    m_flNextSecondaryAttack        47 
#define    OFFSET_SILENCER_FIREMODE        74 
const    USP_SILENCED            =    (1<<0

#define set_usp_silent(%1)    set_pdata_int(%1, OFFSET_SILENCER_FIREMODE, USP_SILENCED, EXTRAOFFSET_WEAPONS) 
#define get_weapon_owner(%1)    get_pdata_cbase(%1, m_pPlayer, EXTRAOFFSET_WEAPONS) 

public plugin_init() 

    
register_plugin("Silenced Usp"VERSION"ConnorMcLeod"

    
RegisterHam(Ham_Item_Deploy"weapon_usp""Usp_Deploy"1
    
RegisterHam(Ham_Weapon_SecondaryAttack"weapon_usp""Usp_SecondaryAttack"1


public 
Usp_Deploy(iEnt

    
set_usp_silent(iEnt
    
SendWeaponAnimget_weapon_owner(iEnt) , 6


public 
Usp_SecondaryAttack(iEnt

    
set_usp_silent(iEnt
    
SendWeaponAnimget_weapon_owner(iEnt) , 0

    
set_pdata_float(iEntm_flNextSecondaryAttack9999.9EXTRAOFFSET_WEAPONS


SendWeaponAnim(idiAnim

    
entity_set_int(idEV_INT_weaponanimiAnim

    
message_begin(MSG_ONESVC_WEAPONANIM_id
    
write_byte(iAnim
    
write_byte(entity_get_int(idEV_INT_body)) 
    
message_end() 

Mucha Gracias ahora lo pruebo. ^^

edit: perfecto.

Last edited by Marcelo21; 11-26-2011 at 11:19.
Marcelo21 is offline
Send a message via MSN to Marcelo21 Send a message via Skype™ to Marcelo21
 



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 06:01.


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