AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Ham_Item_Deploy (https://forums.alliedmods.net/showthread.php?t=211789)

Kard1nal 03-26-2013 09:42

Ham_Item_Deploy
 
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. =(

Arkshine 03-26-2013 10:48

Re: Ham_Item_Deploy
 
Where do you set these vars ?

Kard1nal 03-26-2013 10:53

Re: Ham_Item_Deploy
 
Client cmds and etc.

hleV 03-26-2013 11:38

Re: Ham_Item_Deploy
 
Update the models manually when you change the variable values.

Kard1nal 03-26-2013 11:59

Re: Ham_Item_Deploy
 
How can I call this function manually if it has (weapon_ent) param?
I mean:
public Ham_Item_Deploy_Post(weapon_ent)

hleV 03-26-2013 12:03

Re: Ham_Item_Deploy
 
Code:
new id = pev(weapon_ent, pev_owner);

Kard1nal 03-26-2013 12:06

Re: Ham_Item_Deploy
 
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?
<...>

Arkshine 03-26-2013 12:22

Re: Ham_Item_Deploy
 
Sure you wan, but, I would use ExecuteHamB( Ham_Item_Deploy to tell others plugins you're deploying your weapon.

Bos93 03-26-2013 16:00

Re: Ham_Item_Deploy
 
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 ); 


Kard1nal 03-28-2013 06:51

Re: Ham_Item_Deploy
 
Thank you!


All times are GMT -4. The time now is 22:44.

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