Raised This Month: $ Target: $400
 0% 

Reset view model and block knife attack 2.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 12-24-2008 , 17:36   Reset view model and block knife attack 2.
Reply With Quote #1

1.How to reset set_pev(viewmodel) example like in fakemeta stock:fm_reset_user_model.?
2.How to block knife attack 2.?
xbatista is offline
Send a message via Skype™ to xbatista
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 12-24-2008 , 17:59   Re: Reset view model and block knife attack 2.
Reply With Quote #2

1)

PHP Code:
new g_szVModel33 ][ 62 ];

// [...]

public changeViewModelFunctionid )
{
    
pevidpev_viewmodel2g_szVModelid ], sizeof g_szVModel[] ); // I like using viewmodel2 so I don't have to allocate the model string.
    
set_pevidpev_viewmodel2"models/other_viewmodel_here.mdl" );
}

stock fm_reset_user_viewmodelindex )
{
    
set_pevidpev_viewmodel2g_szVModelindex ] );
}

public 
client_disconnectid )
{
    
g_szVModelid ][ ] = '^0'// Clear array.

2)

PHP Code:
public plugin_init()
{
//    [...]
    
register_forwardFM_CmdStart"Forward_CmdStart" );
}

public 
Forward_CmdStartiduc_handleseed )
{
    static 
Button Button get_ucuc_handleUC_Buttons );
    
    if( 
Button IN_ATTACK2 )
    {
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED:

__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 12-25-2008 , 05:04   Re: Reset view model and block knife attack 2.
Reply With Quote #3

WOW,again you . tHX!!

EDIT: 2. Not works.Maybe you don't check if this a knife?
1.Not tested yet.

Last edited by xbatista; 12-25-2008 at 05:29.
xbatista is offline
Send a message via Skype™ to xbatista
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-25-2008 , 05:31   Re: Reset view model and block knife attack 2.
Reply With Quote #4

What you mean by "reset" model, also witch model are you talking about ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 12-25-2008 , 05:34   Re: Reset view model and block knife attack 2.
Reply With Quote #5

Model about knife, something like this:
PHP Code:
stock fm_reset_user_model(player)
{
    
// Player doesn't have a custom model any longer
    
g_has_custom_model[player] = false
    
    dllfunc
(DLLFunc_ClientUserInfoChangedplayerengfunc(EngFunc_GetInfoKeyBufferplayer))

But reset a weapon models.
Stock.
xbatista is offline
Send a message via Skype™ to xbatista
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-25-2008 , 06:02   Re: Reset view model and block knife attack 2.
Reply With Quote #6

Depends on what plugin you use to set player knife model.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 12-25-2008 , 06:17   Re: Reset view model and block knife attack 2.
Reply With Quote #7

Sorry, you're right.
PHP Code:
#include <fakemeta>

public plugin_init()
{
//    [...]
    
register_forwardFM_CmdStart"Forward_CmdStart" );
}

public 
Forward_CmdStartiduc_handleseed )
{
    static 
Button Button get_ucuc_handleUC_Buttons );
//  If the above line doesn't work, try this:
    
static Button get_ucuc_handleUC_ButtonsButton );
    
    if( ( 
Button IN_ATTACK2 ) && get_user_weaponid ) == CSW_KNIFE )
    {
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED:

__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 12-25-2008 , 06:19   Re: Reset view model and block knife attack 2.
Reply With Quote #8

@CONNOR:
yes knife model.
@Dores ok.
And please fix that problem that you sayied )
http://forums.alliedmods.net/showthr...t=82424&page=2

EDIT: Tested, still not blocking attack2,tryied that 2 lines.

Last edited by xbatista; 12-25-2008 at 06:26.
xbatista is offline
Send a message via Skype™ to xbatista
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-25-2008 , 08:27   Re: Reset view model and block knife attack 2.
Reply With Quote #9

PHP Code:
#include <fakemeta>

public plugin_init()
{
//    [...]
    
register_forwardFM_CmdStart"Forward_CmdStart" );
}

public 
Forward_CmdStartiduc_handleseed )
{
    static 
Buttons Buttons get_ucuc_handleUC_Buttons );
    
    if( ( 
Button IN_ATTACK2 ) && get_user_weaponid ) == CSW_KNIFE )
    {
        
set_ucuc_handleUC_ButtonsButton & ~IN_ATTACK2 )
    }



Witch model plugin ??!
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 12-25-2008 , 08:33   Re: Reset view model and block knife attack 2.
Reply With Quote #10

viewmodel.Knife model.
P.S.Will try block attack2.
xbatista is offline
Send a message via Skype™ to xbatista
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 09:04.


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