AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Local Item Server (https://forums.alliedmods.net/showthread.php?t=189788)

Dr. McKay 07-10-2012 23:01

[TF2] Local Item Server
 
[TF2] Local Item Server

v1.1.4

Description:
Makes your loadout work even when the item server is down. Whenever someone respawns or touches a resupply cabinet, their current loadout is checked. If they are using all stock weapons and the netprop m_bLoadoutUnavailable is true, they will be given their last known loadout using TF2Items. If their loadout is available, it is saved.

Note: Hats, miscs, and action slot items won't be saved.

Cvars:
local_item_server_version - plugin version
local_item_server_auto_update - enables automatic updating (has no effect if Updater is not installed)

Installation:
Put itemserver.smx into /addons/sourcemod/plugins and reboot your server or type "sm plugins load itemserver" into your console or rcon.

Requirements:
This plugin requires TF2Items Give Weapon, and consequently, TF2Items.

Auto Update:
Install Updater. The plugin will be autoupdated according to your Updater settings. It'll work without Updater.

Changelog:
  • v1.1.0 (7/12/12)
    • Added ability to disable automatic updating (local_item_server_auto_update)
  • v1.0.0 (7/10/12)
    • Initial release

Download Plugin (itemserver.smx)
View Source (itemserver.sp)

Sreaper 07-10-2012 23:15

Re: [TF2] Local Item Server
 
This is amazing! Great idea and great plugin!

Horsedick 07-10-2012 23:19

Re: [TF2] Local Item Server
 
+1 up on valve and the item server failure - nice work@!

ReFlexPoison 07-10-2012 23:24

Re: [TF2] Local Item Server
 
um.. thank you =D

MasterOfTheXP 07-10-2012 23:24

Re: [TF2] Local Item Server
 
I already made something like this, where players could choose from a menu of weapons if they didn't have any unlocks...but this...this is genius. Much better than messing with menus. Great job!

DarthNinja 07-10-2012 23:29

Re: [TF2] Local Item Server
 
PHP Code:

Format(qrysizeof(qry), "INSERT INTO `players` VALUES ('%s', -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)"auth); 

Methinks your table needs more DEFAULT.

Dr. McKay 07-10-2012 23:35

Re: [TF2] Local Item Server
 
Quote:

Originally Posted by DarthNinja (Post 1747781)
PHP Code:

Format(qrysizeof(qry), "INSERT INTO `players` VALUES ('%s', -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)"auth); 

Methinks your table needs more DEFAULT.

Perhaps, but it works.

Plus, I don't want to lengthen the already insanely-long create-table query with defaults. I'm under the SourcePawn line length limit by just a few characters. Like, 2, if I remember correctly.

Thanks for approving this, by the way.

Why isn't TF2Items Give Weapon showing up correctly as a dependency?

DarthNinja 07-11-2012 11:28

Re: [TF2] Local Item Server
 
Quote:

Originally Posted by Dr. McKay (Post 1747784)
Plus, I don't want to lengthen the already insanely-long create-table query with defaults. I'm under the SourcePawn line length limit by just a few characters. Like, 2, if I remember correctly.

Could you go into more detail on the subject of what you mean by "SourcePawn line length limit"?

Dr. McKay 07-11-2012 12:50

Re: [TF2] Local Item Server
 
Quote:

Originally Posted by DarthNinja (Post 1748056)
Could you go into more detail on the subject of what you mean by "SourcePawn line length limit"?

Find that ridiculously long line at the beginning and add a few characters to it, then try to compile.

Leonardo 07-11-2012 14:28

Re: [TF2] Local Item Server
 
goodjob~

11530 07-11-2012 16:52

Re: [TF2] Local Item Server
 
Quote:

Originally Posted by Dr. McKay (Post 1748090)
Find that ridiculously long line at the beginning and add a few characters to it, then try to compile.

That line is only 252 characters and is far from the max compiler limit. After tests using the online compiler, I was able to get up to 1020 characters (excluding CR/LF characters) before getting:
Code:

error 075: input line too long (after substitutions)

Dr. McKay 07-11-2012 17:06

Re: [TF2] Local Item Server
 
The local compiler was cutting me off at 255.

DarthNinja 07-11-2012 22:04

Re: [TF2] Local Item Server
 
My longest database query is over 8,000 characters long and has no issues whatsoever.

http://i.imgur.com/PMs3gs.jpg

Dr. McKay 07-12-2012 17:26

Re: [TF2] Local Item Server
 
Updated to v1.1.0. Added ability to disable automatic updating (local_item_server_auto_update).

Majik64 08-17-2012 01:14

Re: [TF2] Local Item Server
 
Did MVM Break this? When ever I launch, I get the threadtools.cpp error. But without this plugin (and the prerequisites) it works fine.

Dr. McKay 08-17-2012 01:16

Re: [TF2] Local Item Server
 
Quote:

Originally Posted by Majik64 (Post 1773670)
Did MVM Break this? When ever I launch, I get the threadtools.cpp error. But without this plugin (and the prerequisites) it works fine.

There might be TF2Items problems. You need to ask there.

Unreal1 09-09-2012 12:04

Re: [TF2] Local Item Server
 
Would it be possible to allow the database this plugin uses be MySQL so I can keep it on my websercer that way the list of everybody's weapons stays on all my servers not just 1?

Unreal1 09-09-2012 12:06

Re: [TF2] Local Item Server
 
Oh and make a car so you van change the quality of the weapon given.

Dr. McKay 09-09-2012 13:34

Re: [TF2] Local Item Server
 
Quote:

Originally Posted by Unreal1 (Post 1795259)
Oh and make a car so you van change the quality of the weapon given.

TF2Items Give Weapon doesn't support giving items with custom qualities.

DarthNinja 09-09-2012 16:25

Re: [TF2] Local Item Server
 
Quote:

Originally Posted by Dr. McKay (Post 1795329)
TF2Items Give Weapon doesn't support giving items with custom qualities.

So set the quality using the netprop after the item is given.

jacek2144 09-16-2012 08:15

Re: [TF2] Local Item Server
 
You should make it work with hats / misc / action etc.

Horsedick 09-16-2012 11:40

Re: [TF2] Local Item Server
 
Quote:

Originally Posted by jacek2144 (Post 1800555)
You should make it work with hats / misc / action etc.

You can't that I know of

Rd1981 11-08-2012 01:40

Re: [TF2] Local Item Server
 
L 11/07/2012 - 16:54:29: [SM] [0] Line 184, D:\Libraries\Documents\Repos\Public Plugins\scripting\itemserver.sp::Timer_GivenH int()
L 11/07/2012 - 17:17:46: Error log file session closed
getting this error.

Dr. McKay 11-08-2012 17:30

Re: [TF2] Local Item Server
 
Quote:

Originally Posted by Rd1981 (Post 1834476)
L 11/07/2012 - 16:54:29: [SM] [0] Line 184, D:\Libraries\Documents\Repos\Public Plugins\scripting\itemserver.sp::Timer_GivenH int()
L 11/07/2012 - 17:17:46: Error log file session closed
getting this error.

Harmless error, but I've updated it to v1.1.3, which fixes this.

Rd1981 11-09-2012 05:55

Re: [TF2] Local Item Server
 
L 11/09/2012 - 20:44:37: [SM] Native "GetClientAuthString" reported: Client 19 is not connected
L 11/09/2012 - 20:44:37: [SM] Displaying call stack trace for plugin "itemserver.smx":
L 11/09/2012 - 20:44:37: [SM] [0] Line 83, D:\Libraries\Documents\Repos\Public Plugins\scripting\itemserver.sp::OnRowChecked ()

jwright8 11-24-2012 19:59

Re: [TF2] Local Item Server
 
This may be a dumb question, but does it preserve-attributes? For instance, if someone has a Strange weapon and the local item server kicks in, will it still be counted? Thanks!

DarthNinja 11-24-2012 20:53

Re: [TF2] Local Item Server
 
Your question isn't really valid. But in your example, the answer is no.
If the GC is down and not serving item data, it's not going to be tracking kill stats ether.

captaindeterprimary 12-08-2012 14:20

Re: [TF2] Local Item Server
 
Awesome! My buddy in mexico will love this! Steam item servers drop him all the time. However does this create a log of weapons said player has in loadout when he has item server connection, would he be able to change weapons? Does the custom item server reset the weapons for all players on map change or say server restart? If so would a sql data base be possible to store said player backpack? I will still try it anyway...

Dr. McKay 12-08-2012 14:40

Re: [TF2] Local Item Server
 
Quote:

Originally Posted by vman315 (Post 1850300)
Awesome! My buddy in mexico will love this! Steam item servers drop him all the time. However does this create a log of weapons said player has in loadout when he has item server connection, would he be able to change weapons? Does the custom item server reset the weapons for all players on map change or say server restart? If so would a sql data base be possible to store said player backpack? I will still try it anyway...

All it does is store your loadout when you spawn. If you spawn with no connection to the item server, it'll give you your last known loadout. You can't change your loadout when there's no connection.

captaindeterprimary 12-08-2012 20:15

Re: [TF2] Local Item Server
 
Okay cool.

Minoost 12-16-2012 10:46

Re: [TF2] Local Item Server
 
NOTE: if in medieval mode, they can use primary weapon when loadout is unavailable.

http://i.imgur.com/EE8Xu.jpg

lyric 07-11-2013 09:56

Re: [TF2] Local Item Server
 
Code:

L 07/09/2013 - 19:51:53: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/09/2013 - 19:55:12: [itemserver.smx] Problem with query: near "77": syntax error
L 07/09/2013 - 19:58:34: [itemserver.smx] Problem with query: near "44": syntax error
L 07/09/2013 - 20:01:44: [itemserver.smx] Problem with query: near "46": syntax error
L 07/09/2013 - 20:03:51: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/09/2013 - 20:08:42: [itemserver.smx] Problem with query: near "351": syntax error
L 07/09/2013 - 20:10:14: [itemserver.smx] Problem with query: near "77": syntax error
L 07/09/2013 - 20:13:44: [itemserver.smx] Problem with query: no such column: scout_slot_1
L 07/09/2013 - 21:01:42: [itemserver.smx] Problem with query: near "39": syntax error
L 07/09/2013 - 23:08:31: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/09/2013 - 23:09:04: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/09/2013 - 23:11:57: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/09/2013 - 23:12:03: [itemserver.smx] Problem with query: near "20": syntax error
L 07/09/2013 - 23:12:04: [itemserver.smx] Problem with query: near "20": syntax error
L 07/09/2013 - 23:12:36: [itemserver.smx] Problem with query: near "46": syntax error
L 07/09/2013 - 23:12:37: [itemserver.smx] Problem with query: near "46": syntax error
L 07/09/2013 - 23:13:31: [itemserver.smx] Problem with query: near "46": syntax error
L 07/09/2013 - 23:14:28: [itemserver.smx] Problem with query: near "39": syntax error
L 07/09/2013 - 23:15:14: [itemserver.smx] Problem with query: near "12": syntax error
L 07/09/2013 - 23:15:22: [itemserver.smx] Problem with query: near "12": syntax error
L 07/09/2013 - 23:18:28: [itemserver.smx] Problem with query: near "20": syntax error
L 07/09/2013 - 23:18:29: [itemserver.smx] Problem with query: near "20": syntax error
L 07/09/2013 - 23:18:34: [itemserver.smx] Problem with query: no such column: heavy_slot_1
L 07/09/2013 - 23:21:20: [itemserver.smx] Problem with query: near "77": syntax error
L 07/09/2013 - 23:22:37: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/09/2013 - 23:26:03: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/09/2013 - 23:32:23: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/09/2013 - 23:53:46: [itemserver.smx] Problem with query: no such column: heavy_slot_1
L 07/09/2013 - 23:54:03: [itemserver.smx] Problem with query: no such column: heavy_slot_1

Code:

L 07/10/2013 - 00:18:20: SourceMod error session started
L 07/10/2013 - 00:18:20: Info (map "ctf_2fort") (file "errors_20130710.log")
L 07/10/2013 - 00:18:20: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:18:29: [itemserver.smx] Problem with query: near "29": syntax error
L 07/10/2013 - 00:18:30: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:18:49: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:18:49: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:18:50: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:18:50: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:18:50: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:18:50: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:19:18: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:19:18: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:19:19: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:19:19: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:19:19: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:19:19: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:19:20: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:19:20: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:19:20: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:19:20: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:19:21: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:19:21: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 00:19:21: [itemserver.smx] Problem with query: no such column: scout_slot_1
L 07/10/2013 - 00:19:21: [itemserver.smx] Problem with query: no such column: scout_slot_1
L 07/10/2013 - 00:19:22: [itemserver.smx] Problem with query: no such column: scout_slot_1
L 07/10/2013 - 03:42:51: [itemserver.smx] Problem with query: near "INTO": syntax error
L 07/10/2013 - 03:42:51: [itemserver.smx] Problem with query: no such column: sniper_slot_1
L 07/10/2013 - 03:42:51: [itemserver.smx] Problem with query: no such column: sniper_slot_1
L 07/10/2013 - 03:42:51: [itemserver.smx] Problem with query: no such column: sniper_slot_1
L 07/10/2013 - 03:42:52: [itemserver.smx] Problem with query: no such column: sniper_slot_1
L 07/10/2013 - 03:42:52: [itemserver.smx] Problem with query: no such column: sniper_slot_1
L 07/10/2013 - 03:42:52: [itemserver.smx] Problem with query: no such column: sniper_slot_1
L 07/10/2013 - 03:42:52: [itemserver.smx] Problem with query: no such column: sniper_slot_1
L 07/10/2013 - 03:42:53: [itemserver.smx] Problem with query: no such column: sniper_slot_1
L 07/10/2013 - 03:42:53: [itemserver.smx] Problem with query: no such column: sniper_slot_1
L 07/10/2013 - 04:25:30: [itemserver.smx] Problem with query: no such column: heavy_slot_1
L 07/10/2013 - 04:25:33: [itemserver.smx] Problem with query: no such column: heavy_slot_1
L 07/10/2013 - 10:34:32: SourceMod error session started
L 07/10/2013 - 10:34:32: Info (map "ctf_2fort") (file "errors_20130710.log")
L 07/10/2013 - 10:34:32: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 11:46:05: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 12:01:47: [itemserver.smx] Problem with query: no such column: scout_slot_1
L 07/10/2013 - 12:20:26: [itemserver.smx] Problem with query: near "39": syntax error
L 07/10/2013 - 12:32:33: [itemserver.smx] Problem with query: near "740": syntax error
L 07/10/2013 - 12:36:59: [itemserver.smx] Problem with query: near "735": syntax error
L 07/10/2013 - 12:39:03: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 12:40:16: [itemserver.smx] Problem with query: no such column: scout_slot_1
L 07/10/2013 - 12:41:27: [itemserver.smx] Problem with query: no such column: heavy_slot_1
L 07/10/2013 - 12:42:00: [itemserver.smx] Problem with query: no such column: heavy_slot_1
L 07/10/2013 - 12:45:47: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 12:51:06: [itemserver.smx] Problem with query: no such column: heavy_slot_1
L 07/10/2013 - 12:51:27: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 13:02:13: [itemserver.smx] Problem with query: no such column: heavy_slot_1
L 07/10/2013 - 13:13:28: [itemserver.smx] Problem with query: near "','": syntax error
L 07/10/2013 - 13:19:42: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 13:19:49: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 13:23:38: [itemserver.smx] Problem with query: near "810": syntax error
L 07/10/2013 - 13:24:20: [itemserver.smx] Problem with query: no such column: scout_slot_1
L 07/10/2013 - 13:26:16: [itemserver.smx] Problem with query: no such column: sniper_slot_1
L 07/10/2013 - 13:28:21: [itemserver.smx] Problem with query: no such column: sniper_slot_1
L 07/10/2013 - 13:29:47: [itemserver.smx] Problem with query: near "81": syntax error
L 07/10/2013 - 13:33:44: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 13:57:05: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 14:17:06: [itemserver.smx] Problem with query: near "39": syntax error
L 07/10/2013 - 14:29:48: [itemserver.smx] Problem with query: near "STEAM_0": syntax error
L 07/10/2013 - 14:40:24: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 14:46:55: [itemserver.smx] Problem with query: near "81": syntax error
L 07/10/2013 - 18:14:05: [itemserver.smx] Problem with query: no such column: scout_slot_1
L 07/10/2013 - 18:15:30: [itemserver.smx] Problem with query: near "735": syntax error
L 07/10/2013 - 18:17:40: [itemserver.smx] Problem with query: no such column: heavy_slot_1
L 07/10/2013 - 18:18:12: [itemserver.smx] Problem with query: near "INTO": syntax error
L 07/10/2013 - 18:19:51: [itemserver.smx] Problem with query: near "81": syntax error
L 07/10/2013 - 18:21:28: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 18:25:49: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 18:29:06: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 18:30:15: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 18:32:25: [itemserver.smx] Problem with query: near "39": syntax error
L 07/10/2013 - 18:33:55: [itemserver.smx] Problem with query: near "736": syntax error
L 07/10/2013 - 18:35:23: [itemserver.smx] Problem with query: no such column: heavy_slot_1
L 07/10/2013 - 18:36:09: [itemserver.smx] Problem with query: near "735": syntax error
L 07/10/2013 - 18:37:27: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 18:53:36: [itemserver.smx] Problem with query: unrecognized token: ""
L 07/10/2013 - 18:56:53: [itemserver.smx] Problem with query: near "207": syntax error


NoZomIBK 10-03-2013 05:40

Re: [TF2] Local Item Server
 
I am running 5 forked servers and it seems, the sqlite driver cant handle parallel writing processes. The file is always broken. I would like to use mysql. is there an easy sollution or must i edit your script?

greetz

SmackDaddy 10-05-2013 14:36

Re: [TF2] Local Item Server
 
is this plugin still working for folks after recent updates?

asherkin 10-05-2013 23:31

[TF2] Local Item Server
 
Quote:

Originally Posted by NoZomIBK (Post 2044504)
I am running 5 forked servers and it seems, the sqlite driver cant handle parallel writing processes. The file is always broken. I would like to use mysql. is there an easy sollution or must i edit your script?

greetz

As the documentation is quite clear on, SourceMod does not support forked servers - you should have one copy of SourceMod per fork.

NoZomIBK 10-06-2013 03:57

Re: [TF2] Local Item Server
 
Quote:

Originally Posted by asherkin (Post 2045640)
As the documentation is quite clear on, SourceMod does not support forked servers - you should have one copy of SourceMod per fork.

I know that and all needed files are separated. the files they should have in common are symlinks. and i want to have the local items equal on all five servers... with mysql it wouldnt be a problem, with sqlite it is. thanks to the dbi it should not be a problem to switch by config, but it must be implemented.

the programmen knows his code the best, so if he could quickly implement this, it would be great. if not, i will do it on my next free day. but i think, there could be more people outside, who want the mysql connection.

SmackDaddy 09-11-2015 10:33

Re: [TF2] Local Item Server
 
It this still working for folks? Thank you in advance.

lugui 02-27-2016 07:45

Re: [TF2] Local Item Server
 
this is not working on my server

Horsedick 02-27-2016 09:58

Re: [TF2] Local Item Server
 
Quote:

Originally Posted by lugui (Post 2397310)
this is not working on my server

Make sure everything is updated that needs to run with this to work.

lugui 02-29-2016 20:49

Re: [TF2] Local Item Server
 
Quote:

Originally Posted by Horsedick (Post 2397352)
Make sure everything is updated that needs to run with this to work.

I using the autoupdate in TF2Items Give Weapon and TF2Items.


All times are GMT -4. The time now is 08:33.

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