Raised This Month: $51 Target: $400
 12% 

[L4D]GiveNamedItem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wgooch
Member
Join Date: Dec 2008
Old 07-03-2009 , 21:08   [L4D]GiveNamedItem
Reply With Quote #1

Just before June 25's l4d update, I had plugins
using GiveNamedItem to create an item and then WeaponEquip to force them to use it, after the update it is unable to create an entity with GiveNamedItem, I am unaware if EquipPlayerWeapon still works at all.
CreateEntityByName still works to create weapon entities though, so I am able to use it. Is it possible that the offsets changed or that the function is now broken?

Could someone possibly verify if the function is still working for them, or provide me with info on this, perhaps how to get it working again?

Thanks.

Edit:
It turns out that EquipPlayerWeapon actually crashes servers now, any ideas on an alternative to equipping a player with a weapon?

Last edited by wgooch; 07-04-2009 at 01:58. Reason: More info
wgooch is offline
doku
Member
Join Date: May 2009
Old 07-04-2009 , 05:21   Re: [L4D]GiveNamedItem
Reply With Quote #2

I use this, hope it helps



PHP Code:
new Handle:hGameConf INVALID_HANDLE
new Handle:hGiveNamedItem INVALID_HANDLE

//=======================================

public OnPluginStart()
{
    
hGameConf LoadGameConfigFile("l4d")
    
    
StartPrepSDKCall(SDKCall_Player)
    
PrepSDKCall_SetFromConf(hGameConfSDKConf_Virtual"GiveNamedItem")
    
PrepSDKCall_AddParameter(SDKType_StringSDKPass_Pointer)
    
PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_Plain)
    
PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_Plain)
    
PrepSDKCall_SetReturnInfo(SDKType_CBaseEntitySDKPass_Plain)
    
hGiveNamedItem EndPrepSDKCall()

//=======================================

public GiveNamedItem(clientString:weapon[])
{
    
SDKCall(hGiveNamedItemclientweapon1true)
}

//======================================= 
make sure you have a l4d.txt in the gamedata folder with the following :

PHP Code:
"Games"
{
    
"left4dead"
    
{
        
"Offsets"
        
{
            
"GiveNamedItem"
            
{
                
"windows"    "404"
                "linux"        "405"
            
}
        }
    }

doku 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 19:03.


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