Raised This Month: $ Target: $400
 0% 

Set player's hand model when no weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FlyingHorse
Senior Member
Join Date: Apr 2010
Location: Under your bed.
Old 06-05-2010 , 09:28   Re: Set player's hand model when no weapon
Reply With Quote #1

Quote:
his hands are "modelled" to the weapon he used last time. I need it to always be knife animation.

w....w... what? .. I didnt get any of that
FlyingHorse is offline
Send a message via Skype™ to FlyingHorse
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-05-2010 , 09:46   Re: Set player's hand model when no weapon
Reply With Quote #2

It's hard to explain.

Look.

When you have no weapon in your hands, the player model looks like you are holding the last one, but without it in the hands. Just the model is changed.

What I need is, when there are no weapons in hands of an user, to set his animation to look like he had a knife.

Look on the screenshot.

On the first image, he had glock or something before.
On the second one, he had knife.

That is what I want. I need to set model of hands to always look like he used knife, no matter what weapon he had before.
Attached Thumbnails
Click image for larger version

Name:	sc.JPG
Views:	316
Size:	38.9 KB
ID:	67170  
Backstabnoob is offline
infek
Senior Member
Join Date: May 2009
Location: Behind you
Old 06-05-2010 , 13:14   Re: Set player's hand model when no weapon
Reply With Quote #3

What hes trying to say is that, he doesnt want the players hands looking like he's holding a weapon that he was holding before as you can see in his screenshot the first one looks like hes holding a Glock and second looks like hes holding a knife... he doesnt want it to appear like that
__________________
"Domo Arigato, Mr. Roboto!"
PM me if you want to know a secret
infek is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-05-2010 , 13:25   Re: Set player's hand model when no weapon
Reply With Quote #4

Try to replace in plugins strip_user_weapons(id) with Cs_Strip_User_Weapons( id )

Put this stock at the end of .sma

PHP Code:
Cs_Strip_User_Weaponsid )
{
    
engclient_cmd(id"weapon_knife")
    
strip_user_weapons(id)
    
set_pdata_int(id11605)

And then recompile.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-05-2010 , 18:00   Re: Set player's hand model when no weapon
Reply With Quote #5

I'm not using strip_user_weapons, I just have a plugin that makes players able to drop the knife. Will it be fine to check if player has no weapon on CurWeapon event, then do that set_pdata_int thing?

Edit: Like this?

PHP Code:
#include < amxmodx >
#include < engine >
#include < hamsandwich >

new g_iCurrentWeapon33 ]


public 
plugin_init( )
{
    
register_event"CurWeapon""event_CurWeapon""be""1=0""2=0""3=0" )
    
RegisterHam(Ham_Spawn"player""player_spawn"1);
}

public 
plugin_precache( )
{
    
precache_modelp_model )
}


public 
player_spawn(id)
    
event_CurWeapon(id)


public 
event_CurWeaponid )
{
    if( !
is_user_aliveid ) )
        return
        
    
g_iCurrentWeaponid ] = read_data)
    
    if( 
g_iCurrentWeaponid ] )
        return
        
        
set_pdata_int(id11605

I'm calling the event on respawn cause when the player respawns, he holds no weapon.
Backstabnoob is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-06-2010 , 04:49   Re: Set player's hand model when no weapon
Reply With Quote #6

Set the private data has no effect on animation.
Should be another way to force animation.

Can you post that plugin that allow knife drop ?
Is is for jail break server ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-06-2010 , 11:09   Re: Set player's hand model when no weapon
Reply With Quote #7

I use advanced respawn and I only edited that when you respawn, the plugin doesn't give you default weapons(USP/glock, knife). The knife drop plugin is here: http://forums.alliedmods.net/showthread.php?p=935486

What about setting players model to one without knife? It's jailbreak's bknuckles p_ animation. It's in attachments.
Attached Files
File Type: zip p_bknuckles.zip (264 Bytes, 107 views)
Backstabnoob 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 05:21.


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