Raised This Month: $ Target: $400
 0% 

[L4D2] Weapon Drop


Post New Thread Reply   
 
Thread Tools Display Modes
Machine
Senior Member
Join Date: Apr 2010
Old 12-30-2011 , 19:44   Re: [L4D2] Weapon Drop
Reply With Quote #41

Yes, the model index will change depending if they are on your back or equipped.

Updated to 1.4
Machine is offline
dcx2
Senior Member
Join Date: Sep 2011
Old 12-30-2011 , 19:53   Re: [L4D2] Weapon Drop
Reply With Quote #42

No, I mean that the m_iWorldModelIndex is different on various maps. On Dead Center, it's 359/360. On Dark Carnival, it's 241/242, so the defib will still become invisible.
dcx2 is offline
Machine
Senior Member
Join Date: Apr 2010
Old 12-30-2011 , 21:01   Re: [L4D2] Weapon Drop
Reply With Quote #43

Well all be damned.

Okay, reuploaded 1.4 again.
Machine is offline
saucex4
Junior Member
Join Date: May 2012
Old 05-30-2012 , 08:24   [BUG] Text file is incorrectly named
Reply With Quote #44

The text file you supply is named incorrectly. If you rename the text file to l4d2addresses.txt the plugin will load correctly.

This is the code in question. By simply changing

hConf = LoadGameConfigFile("l4d2addresses");

to

hConf = LoadGameConfigFile("l4d2_weapon_drop");

will fix the problem.

Code:
stock SDKCallWeaponDrop(client, weapon)
{
        static Handle:hWeaponDrop=INVALID_HANDLE;
        if (hWeaponDrop==INVALID_HANDLE){
        new Handle:hConf = INVALID_HANDLE;
        hConf = LoadGameConfigFile("l4d2addresses");
        StartPrepSDKCall(SDKCall_Player);
    PrepSDKCall_SetFromConf(hConf, SDKConf_Signature, "WeaponDrop");
    PrepSDKCall_AddParameter(SDKType_CBaseEntity, SDKPass_Pointer);
        hWeaponDrop = EndPrepSDKCall();
        CloseHandle(hConf);
        if (hWeaponDrop == INVALID_HANDLE){
                SetFailState("Can't initialize WeaponDrop SDKCall!");
                return;
        }            
        }
       .....
}
saucex4 is offline
Machine
Senior Member
Join Date: Apr 2010
Old 08-05-2012 , 17:40   Re: [BUG] Text file is incorrectly named
Reply With Quote #45

Thank you.
Machine is offline
dr leks
Junior Member
Join Date: Jul 2013
Old 08-01-2013 , 17:30   Re: [L4D2] Weapon Drop
Reply With Quote #46

L 08/1/2013 - 23:21:03: [SM] Displaying call stack trace for plugin "l4d2_drop.smx":
L 08/1/2013 - 23:21:04: [SM] [0] Line 156, l4d2_drop.sp::Command_SpawnItem()

Last edited by dr leks; 08-01-2013 at 17:32.
dr leks is offline
Electr000999
Senior Member
Join Date: Aug 2011
Old 08-02-2013 , 07:28   Re: [L4D2] Weapon Drop
Reply With Quote #47

dr leks , "Weapon_Drop" sdk call signature outdated on this plugin.

you can use my sdkhooks port.


in source:
#define sdk_hooks_edition 0 - sdk call default in this plugin / 1 - sdkhooks native.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_drop.sp - 666 views - 5.3 KB)

Last edited by Electr000999; 08-02-2013 at 07:42.
Electr000999 is offline
Send a message via Skype™ to Electr000999
St00ne
Veteran Member
Join Date: Jan 2011
Location: Annecy - France
Old 09-11-2014 , 20:37   Re: [L4D2] Weapon Drop
Reply With Quote #48

Quote:
Originally Posted by Electr000999 View Post
dr leks , "Weapon_Drop" sdk call signature outdated on this plugin.

you can use my sdkhooks port.


in source:
#define sdk_hooks_edition 0 - sdk call default in this plugin / 1 - sdkhooks native.
Thx it's working great (to be honest I didn't try the one in 1st post which requires the gamedata file.)
__________________

*** *** ***
-My plugins-

Last edited by St00ne; 09-11-2014 at 20:39.
St00ne is offline
Machine
Senior Member
Join Date: Apr 2010
Old 09-11-2014 , 20:54   Re: [L4D2] Weapon Drop
Reply With Quote #49

Quote:
Originally Posted by Electr000999 View Post
dr leks , "Weapon_Drop" sdk call signature outdated on this plugin.

you can use my sdkhooks port.


in source:
#define sdk_hooks_edition 0 - sdk call default in this plugin / 1 - sdkhooks native.
Thank you for updating this. I'm going to remove the gamedata requirement now.
Machine is offline
Electr000999
Senior Member
Join Date: Aug 2011
Old 01-22-2016 , 14:49   Re: [L4D2] Weapon Drop
Reply With Quote #50

my team found one very bad bug. if you bind drop command and try throw pipe or molotov after 0.5 sec press drop bind and you item just copy.
Electr000999 is offline
Send a message via Skype™ to Electr000999
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 00:09.


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