Raised This Month: $ Target: $400
 0% 

Ham_Item_Deploy


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 03-26-2013 , 09:42   Ham_Item_Deploy
Reply With Quote #1

Right now I've got CurWeapon event in my plugin:
Spoiler


I want to remake it in Ham_Item_Deploy but have 1 question: as you see, I've got some IFs in my CurWeapon, so if during the round some of this vars changes, will the model change immediately too?
I mean: player have knife in his hands, and something happens - will his model of the knife change immediately or only after he change his weapon?

Really sorry for my English. =(
__________________
Sorry for my English, I'm Russian.

Last edited by Kard1nal; 03-26-2013 at 10:54.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-26-2013 , 10:48   Re: Ham_Item_Deploy
Reply With Quote #2

Where do you set these vars ?
__________________
Arkshine is offline
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 03-26-2013 , 10:53   Re: Ham_Item_Deploy
Reply With Quote #3

Client cmds and etc.
__________________
Sorry for my English, I'm Russian.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 03-26-2013 , 11:38   Re: Ham_Item_Deploy
Reply With Quote #4

Update the models manually when you change the variable values.
__________________
hleV is offline
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 03-26-2013 , 11:59   Re: Ham_Item_Deploy
Reply With Quote #5

How can I call this function manually if it has (weapon_ent) param?
I mean:
public Ham_Item_Deploy_Post(weapon_ent)
__________________
Sorry for my English, I'm Russian.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 03-26-2013 , 12:03   Re: Ham_Item_Deploy
Reply With Quote #6

Code:
new id = pev(weapon_ent, pev_owner);
__________________
hleV is offline
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 03-26-2013 , 12:06   Re: Ham_Item_Deploy
Reply With Quote #7

No, I already know how to get user index in this function.

I mean, when I have to call this function manually in my plugin, what I should write in ()?

<...>
Ham_Item_Deploy_Post(???)//calling function manually: write what?
<...>
__________________
Sorry for my English, I'm Russian.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-26-2013 , 12:22   Re: Ham_Item_Deploy
Reply With Quote #8

Sure you wan, but, I would use ExecuteHamB( Ham_Item_Deploy to tell others plugins you're deploying your weapon.
__________________
Arkshine is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 03-26-2013 , 16:00   Re: Ham_Item_Deploy
Reply With Quote #9

PHP Code:
const m_pActiveItem 373;

const 
OFFSET_LINUX 5;

#define IsValidPrivateData(%0)    ( pev_valid( %0 ) == 2 ) 
PHP Code:
    if( !IsValidPrivateDatapPlayer ) )
    {
        return;
    }

    new 
pEntity get_pdata_cbasepPlayer m_pActiveItem OFFSET_LINUX );

    
ExecuteHamBHam_Item_DeploypEntity ); 
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 03-28-2013 , 06:51   Re: Ham_Item_Deploy
Reply With Quote #10

Thank you!
__________________
Sorry for my English, I'm Russian.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
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 16:47.


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