AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   CSGO Items API (https://forums.alliedmods.net/showthread.php?t=279187)

quasemago 11-14-2019 01:14

Re: CSGO Items API
 
Quote:

Originally Posted by paulo_crash (Post 2672820)
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); 


paulo_crash 11-14-2019 08:39

Re: CSGO Items API
 
Quote:

Originally Posted by quasemago (Post 2672872)
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.

quasemago 11-14-2019 19:42

Re: CSGO Items API
 
Quote:

Originally Posted by paulo_crash (Post 2672907)
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

paulo_crash 11-15-2019 09:58

Re: CSGO Items API
 
Quote:

Originally Posted by quasemago (Post 2672969)
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.

Bara 11-23-2019 11:26

Re: CSGO Items API
 
4 Attachment(s)
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.

HenryTownshand 04-12-2020 08:57

Re: CSGO Items API
 
2 Attachment(s)
I tried to convert a csgo_russian.txt
the text is empty


All times are GMT -4. The time now is 19:57.

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