Raised This Month: $159 Target: $400
 39% 

CSGO Items API


Post New Thread Reply   
 
Thread Tools Display Modes
quasemago
Member
Join Date: Dec 2018
Location: Brazil
Old 11-14-2019 , 02:14   Re: CSGO Items API
Reply With Quote #51

Quote:
Originally Posted by paulo_crash View Post
Someone would have fixed this problem with the latest version of PTaH:
Code:
L 11/13/2019 - 09:46:01: [SM] Exception reported: Invalid event PTaH_HookType specified
L 11/13/2019 - 09:46:01: [SM] Blaming: CSGO_Items.smx
L 11/13/2019 - 09:46:01: [SM] Call stack trace:
L 11/13/2019 - 09:46:01: [SM]   [0] PTaH
L 11/13/2019 - 09:46:01: [SM]   [1] Line 429, C:\Users\Michael\OneDrive\Documents\Development\PAWN\Projects\CSGO-Items\addons\sourcemod\scripting\CSGO_Items.sp::OnPluginStart
L 11/13/2019 - 09:46:01: [SM] Unable to load plugin "CSGO_Items.smx": Error detected in plugin startup (see error logs)
L 11/13/2019 - 09:46:05: [SM] Unable to load plugin "ItemLog.smx": Could not find required plugin "CSGO_Items"
Line 429
PHP Code:
PTaH(PTaH_GiveNamedItemHookGiveNamedItemPost); 
Should be
PHP Code:
PTaH(PTaH_GiveNamedItemPostHookGiveNamedItemPost); 
__________________
I accept requests for plugins and configuration of servers.


Last edited by quasemago; 11-14-2019 at 02:14.
quasemago is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 11-14-2019 , 09:39   Re: CSGO Items API
Reply With Quote #52

Quote:
Originally Posted by quasemago View Post
Line 429
PHP Code:
PTaH(PTaH_GiveNamedItemHookGiveNamedItemPost); 
Should be
PHP Code:
PTaH(PTaH_GiveNamedItemPostHookGiveNamedItemPost); 
Tried this change and error to compile:
Code:
//SourceMod Batch Compiler
// by the SourceMod Dev Team


//// CSGO_Items.sp
//
// C:\Users\boy-l\Google Drive\ZK Servidores\Addons\Counter Strike Global Offensive\Editar Plugins\addons\sourcemod\scripting\CSGO_Items.sp(429) : error 100: function prototypes do not match
// C:\Users\boy-l\Google Drive\ZK Servidores\Addons\Counter Strike Global Offensive\Editar Plugins\addons\sourcemod\scripting\CSGO_Items.sp(501) : error 100: function prototypes do not match
//
// 2 Errors.
//
// Compilation Time: 0,41 sec
// ----------------------------------------

Press enter to exit ...
It would be two lines that I have to change in this case.
__________________
paulo_crash is offline
Send a message via Skype™ to paulo_crash
quasemago
Member
Join Date: Dec 2018
Location: Brazil
Old 11-14-2019 , 20:42   Re: CSGO Items API
Reply With Quote #53

Quote:
Originally Posted by paulo_crash View Post
Tried this change and error to compile:
It would be two lines that I have to change in this case.
Line 813:
PHP Code:
public void GiveNamedItemPost(int iClient, const char[] sClassname, const CEconItemView Itemint iEnt
Should be
PHP Code:
public void GiveNamedItemPost(int iClient, const char[] sClassname, const CEconItemView Itemint iEntbool OriginIsNULL, const float Origin[3]) 
Ref: https://github.com/komashchenko/PTaH.../PTaH.inc#L298
__________________
I accept requests for plugins and configuration of servers.


Last edited by quasemago; 11-14-2019 at 20:43.
quasemago is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 11-15-2019 , 10:58   Re: CSGO Items API
Reply With Quote #54

Quote:
Originally Posted by quasemago View Post
Line 813:
PHP Code:
public void GiveNamedItemPost(int iClient, const char[] sClassname, const CEconItemView Itemint iEnt
Should be
PHP Code:
public void GiveNamedItemPost(int iClient, const char[] sClassname, const CEconItemView Itemint iEntbool OriginIsNULL, const float Origin[3]) 
Ref: https://github.com/komashchenko/PTaH.../PTaH.inc#L298
Thank you, I did it.

I will be posting here the CSGO Items API compiled with SourceMod v1.10 and PTaH v1.1.1.

Thanks to @quasemago.
Attached Files
File Type: zip CSGO Items API v1.5.0.zip (676.4 KB, 19 views)
__________________
paulo_crash is offline
Send a message via Skype™ to paulo_crash
Bara
AlliedModders Donor
Join Date: Apr 2012
Location: Germany
Old 11-23-2019 , 12:26   Re: CSGO Items API
Reply With Quote #55

Here's a version without SteamWorks and PTAH. It converts the csgo_english.txt to UTF-8 himself and rebase the items_game.txt with the help of Dynamic. It works completely locally now, without any required API.

It's not real tested, but with "ItemLog" it looks good.

// Edit:
I tested it with my knifes/ws plugins and works good.
Spoiler
Attached Files
File Type: sp Get Plugin or Get Source (CSGO_Items.sp - 16 views - 120.4 KB)
File Type: sp Get Plugin or Get Source (dynamic.sp - 12 views - 20.4 KB)
File Type: smx dynamic.smx (56.0 KB, 6 views)
File Type: smx CSGO_Items.smx (326.9 KB, 7 views)
__________________

Last edited by Bara; 11-23-2019 at 12:44.
Bara 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 10:05.


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