Raised This Month: $32 Target: $400
 8% 

CS:GO GiveNamedItem Econ


Post New Thread Reply   
 
Thread Tools Display Modes
metal_upa
Senior Member
Join Date: Jun 2016
Old 11-08-2016 , 04:32   Re: CS:GO GiveNamedItem Econ
Reply With Quote #131

Quote:
Originally Posted by _GamerX View Post
Please add some examples, I do not know how to use it
This extension only has 1 feature.

Code:
/* Called before createing a econ item view
 * Return Plugin_Continue to create a econitem view based on the players  loadout, anything else to bypass it and use the original GiveNameItem  paramaters.
 *
 * @param client        Client the item is being given to.
 * @param iDefIndex        The definition index of the item.
 * @param iTeam            Clients team
 * @param iLoadoutSlot    Loadout slot for the given item. If -1 the  item is not for the clients team. (ak47 for ct's for example)
 * @param szItem        Item string passed to GiveNameItem
 *
*/
forward Action:GNIEcon_OnGiveNamedItem(client, iDefIndex, iTeam, iLoadoutSlot, const String:szItem[]);
PHP Code:
#define PLUGIN_AUTHOR "metal_upa"
#define PLUGIN_VERSION "0.0.1"

#include <sourcemod>
#include <gniecon>

public Plugin:myinfo 
{
    
name "GiveNameItemFix",
    
author PLUGIN_AUTHOR,
    
description "Fix GiveNameItem in CSGO",
    
version PLUGIN_VERSION,
    
url "www.google.com"
};

public 
Action:GNIEcon_OnGiveNamedItem(clientiDefIndexiTeamiLoadoutSlot, const String:szItem[])
{
    return 
Plugin_Continue;

return Plugin_Continue will give you a weapon with a correct weapon skin.
metal_upa is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 11-08-2016 , 04:55   Re: CS:GO GiveNamedItem Econ
Reply With Quote #132

Quote:
Originally Posted by metal_upa View Post
This extension only has 1 feature.

Code:
/* Called before createing a econ item view
 * Return Plugin_Continue to create a econitem view based on the players  loadout, anything else to bypass it and use the original GiveNameItem  paramaters.
 *
 * @param client        Client the item is being given to.
 * @param iDefIndex        The definition index of the item.
 * @param iTeam            Clients team
 * @param iLoadoutSlot    Loadout slot for the given item. If -1 the  item is not for the clients team. (ak47 for ct's for example)
 * @param szItem        Item string passed to GiveNameItem
 *
*/
forward Action:GNIEcon_OnGiveNamedItem(client, iDefIndex, iTeam, iLoadoutSlot, const String:szItem[]);
PHP Code:
#define PLUGIN_AUTHOR "metal_upa"
#define PLUGIN_VERSION "0.0.1"

#include <sourcemod>
#include <gniecon>

public Plugin:myinfo 
{
    
name "GiveNameItemFix",
    
author PLUGIN_AUTHOR,
    
description "Fix GiveNameItem in CSGO",
    
version PLUGIN_VERSION,
    
url "www.google.com"
};

public 
Action:GNIEcon_OnGiveNamedItem(clientiDefIndexiTeamiLoadoutSlot, const String:szItem[])
{
    return 
Plugin_Continue;

return Plugin_Continue will give you a weapon with a correct weapon skin.
The extension will do that by default. That forward is used to block giving skinned weapons of the opposite team by returning Plugin_Handled under whatever conditions you like. So you can use the engine's logic on certain clients.
Usually you just want to load it and forget it.
__________________
Peace-Maker is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 12-01-2016 , 09:32   Re: CS:GO GiveNamedItem Econ
Reply With Quote #133

Updated gamedata.
Dr!fter is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 01-23-2017 , 06:44   Re: CS:GO GiveNamedItem Econ
Reply With Quote #134

not understand what this doing.. can somebody write good example? or say what is it?
Attached Images
File Type: jpg 50.jpg (87.0 KB, 184 views)

Last edited by ZASTRELIS; 01-23-2017 at 07:02. Reason: have read previous posts..
ZASTRELIS is offline
ejik03
AlliedModders Donor
Join Date: Feb 2009
Location: Moscow, Russia
Old 03-25-2017 , 04:46   Re: CS:GO GiveNamedItem Econ
Reply With Quote #135

Quote:
Originally Posted by Dr!fter View Post
Updated gamedata.
Linux signature of the "HandleCommand_Buy_Internal" changed in today update. Can you update it?
ejik03 is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 03-25-2017 , 09:21   Re: CS:GO GiveNamedItem Econ
Reply With Quote #136

I updated game data that I knew was broken.
Dr!fter is offline
Sketchy
Senior Member
Join Date: Nov 2010
Old 05-13-2017 , 07:30   Re: CS:GO GiveNamedItem Econ
Reply With Quote #137

After the 05/12 CS:GO update, this extension (at least on Windows servers, with SM 1.8.0.5993) now causes the server to crash when a player first joins either team. Removing csgo_gni_econ.ext.2.csgo.dll from the extensions folder resolves the crash issue.

Last edited by Sketchy; 05-13-2017 at 23:06.
Sketchy is offline
Byte
Senior Member
Join Date: Jun 2010
Location: 📦 CCSPlayer
Old 05-15-2017 , 17:13   Re: CS:GO GiveNamedItem Econ
Reply With Quote #138

Quote:
Originally Posted by Sketchy View Post
After the 05/12 CS:GO update, this extension (at least on Windows servers, with SM 1.8.0.5993) now causes the server to crash when a player first joins either team. Removing csgo_gni_econ.ext.2.csgo.dll from the extensions folder resolves the crash issue.
I just did a little test. Working fine for me. Gamedata and offsets seem fine also.
Maybe something else is conflicting that perhaps uses the include?

--------

Drifter, is there a way this can be modified so if you are a T with M4A1-S equipped on CT and you get spawned a M4A4, it gives you the M4A4 unskinned rather than giving you the equipped skinned M4A1-S?
__________________
STEAM: /id/invexbyte | Github: Mo Beigi | Discord: Byte#0017
Community: Invex Gaming | My Plugins: Click Me!

Byte is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 05-16-2017 , 11:33   Re: CS:GO GiveNamedItem Econ
Reply With Quote #139

Use the forward and block it and give a m4a4
Dr!fter is offline
Sketchy
Senior Member
Join Date: Nov 2010
Old 05-16-2017 , 17:12   Re: CS:GO GiveNamedItem Econ
Reply With Quote #140

I updated SM from 1.8.5993 to the most recent .5995 and still same thing.

How do I go about checking if something uses the include? Are you referring to a plugin using it? If I rename the plugins folder so that absolutely no plugins are loaded, the server still crashes on player join if csgo_gni_econ.ext.2.csgo.dll is in the extensions folder, but doesn't crash if I remove or rename it.

Up until the 05/12 update I had been using this extension with no problems for a few years now on a couple of GunGame servers as well as a 1v1 Arena server.
Sketchy is offline
Reply


Thread Tools
Display Modes

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 18:28.


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