Raised This Month: $ Target: $400
 0% 

different Knives


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PsychoPach
Member
Join Date: Aug 2010
Location: Lithuania
Old 08-10-2011 , 10:37   different Knives
Reply With Quote #1

Hi all
how to make the models that they will have different knives?
And How make Menu for example:

1. BERSERK
2. KRALL
3. CARMINE
4. VOX
5. GIRL
6. BLADE
7. ROBOT



Sorry for my englsh I use translete :/
__________________
Sorry for me english

Last edited by PsychoPach; 08-11-2011 at 13:47.
PsychoPach is offline
Send a message via Skype™ to PsychoPach
usaexelent
Senior Member
Join Date: Nov 2009
Location: Lithuania
Old 08-10-2011 , 10:46   Re: different Knives
Reply With Quote #2

There is a menu generator on amx studio.

Last edited by Exolent[jNr]; 08-10-2011 at 10:53. Reason: Engish only.
usaexelent is offline
Send a message via Skype™ to usaexelent
Pur3Biatch
Junior Member
Join Date: Jun 2011
Location: Czech Republic
Old 08-10-2011 , 11:21   Re: different Knives
Reply With Quote #3

Menu ->
New AMXX Menu System by Emp`

Change knife model ->
PHP Code:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Plugin"
#define VERSION "1.0"
#define AUTHOR "Pur3"

new const p_Model[] = "models/p_m134.mdl"  // way to p_model
new const v_Model[] = "models/v_m134.mdl" // way to v_model

new bool:HasBerseker[33] = false

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd"say /Berserk""Berserk")
    
    
register_event("CurWeapon" "cur_weapon" "be" "1=1")
}

public 
Berserk(id)
{
    
//...
    
HasBerseker[id] = true;
    
//...
}

public 
cur_weapon(id)
{
    if(
read_data(2) == CSW_KNIFE)
    {
        if(
HasBerseker[id])
        {
            
set_pev(idpev_viewmodel2v_Model)
            
set_pev(idpev_weaponmodel2p_Model)
        }
    }
    return 
PLUGIN_CONTINUE

Pur3Biatch is offline
Send a message via Skype™ to Pur3Biatch
PsychoPach
Member
Join Date: Aug 2010
Location: Lithuania
Old 08-10-2011 , 12:07   Re: different Knives
Reply With Quote #4

Berserk knive model change, but i need to change krall,vox,girl.... too.
__________________
Sorry for me english
PsychoPach is offline
Send a message via Skype™ to PsychoPach
Pur3Biatch
Junior Member
Join Date: Jun 2011
Location: Czech Republic
Old 08-10-2011 , 12:33   Re: different Knives
Reply With Quote #5

Copy/Paste, but do new variables (new bool:HasKrall[33] = false) and...
PHP Code:
new const p_Krall[] = "models/p_.mdll"  // way to p_model 
new const v_Krall[] = "models/v_.mdl" // way to v_model
//...
public cur_weapon(id

    if(
read_data(2) == CSW_KNIFE
    { 
        if(
HasBerseker[id]) 
        { 
            
set_pev(idpev_viewmodel2v_Model
            
set_pev(idpev_weaponmodel2p_Model
        }
        if(
HasKrall[id]) 
        { 
            
set_pev(idpev_viewmodel2v_Krall
            
set_pev(idpev_weaponmodel2p_Krall
        } 
    } 
    return 
PLUGIN_CONTINUE 

..and..
PHP Code:
public Krall(id)    
{   
  
//...
  
HasKrall[id] = true;
  
//...


Last edited by Pur3Biatch; 08-10-2011 at 12:41. Reason: wrong variable
Pur3Biatch is offline
Send a message via Skype™ to Pur3Biatch
usaexelent
Senior Member
Join Date: Nov 2009
Location: Lithuania
Old 08-10-2011 , 12:41   Re: different Knives
Reply With Quote #6

new bool:HasKrall[33] = false
Its already by default false
usaexelent is offline
Send a message via Skype™ to usaexelent
Pur3Biatch
Junior Member
Join Date: Jun 2011
Location: Czech Republic
Old 08-10-2011 , 12:45   Re: different Knives
Reply With Quote #7

It doesn't matter
Pur3Biatch is offline
Send a message via Skype™ to Pur3Biatch
PsychoPach
Member
Join Date: Aug 2010
Location: Lithuania
Old 08-10-2011 , 13:48   Re: different Knives
Reply With Quote #8

Very Thanks Pur3Biatch
__________________
Sorry for me english
PsychoPach is offline
Send a message via Skype™ to PsychoPach
PsychoPach
Member
Join Date: Aug 2010
Location: Lithuania
Old 08-11-2011 , 11:30   Re: different Knives
Reply With Quote #9

how to make the individual knives should post their own power?
and how make that they should have their sounds?
__________________
Sorry for me english

Last edited by PsychoPach; 08-11-2011 at 13:48.
PsychoPach is offline
Send a message via Skype™ to PsychoPach
Pur3Biatch
Junior Member
Join Date: Jun 2011
Location: Czech Republic
Old 08-11-2011 , 12:01   Re: different Knives
Reply With Quote #10

Custom Damage ->
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>


public plugin_init() 
{
    
RegisterHam(Ham_TakeDamage"player""player_takedamage")    
}

public 
player_takedamage(victiminflictorattackerFloat:damagedamage_bits)
{
    if(
is_user_alive(attacker))
    {
        if(
get_user_weapon(attacker) == CSW_KNIFE)
        {
            if(
HasBerserk[attacker])
            {        
                
SetHamParamFloat(450//but it's left and right mouse button 
                //when attacking you give 50 damage
                
if(get_pdata_int(victim75) == HIT_HEAD//HeadShot
                
{
                    
SetHamParamFloat(475)
                                                        
// If you attack someone and give head give 75 damage
                
}
            }
        }
    }

And for other sound look at -> this <-

Last edited by Pur3Biatch; 08-11-2011 at 12:04.
Pur3Biatch is offline
Send a message via Skype™ to Pur3Biatch
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 03:21.


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