AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Block Trading (https://forums.alliedmods.net/showthread.php?t=142983)

Matheus28 11-12-2010 21:45

[TF2] Block Trading
 
1 Attachment(s)
Introduction
If a player effectuates a trade when not in setup, he is banned for 5 minutes.

Players with admin flag "a" will not get banned, but their trading partner will. (Not fixable, sorry)

ConVars
  • sm_blocktrading_enable "1" - Enables Block Trading
  • sm_blocktrading_allow_spec "1" - Allow spectators to trade
  • sm_blocktrading_craft "0" - Allows crafting (1) or disallows it (0)

bl4nk 11-12-2010 23:54

Re: [TF2] Block Trading
 
Well that's just mean.

Matheus28 11-13-2010 00:00

Re: [TF2] Block Trading
 
Well, item_found is the only way to know that the player traded. I made this because some players think my servers are trade servers...

crazydog 11-13-2010 04:06

Re: [TF2] Block Trading
 
Some suggested feature additions:
-Different punishments (kick, shorter/longer ban)
-Maybe a warning system? 3 strikes and you're out?
-Minimum player level for plugin to become active?

Also, for the admin immunity part:
I'm not sure if this will work, but some testing can confirm it.
If a trade is detected, and the user is an admin, the next trade detected will not be punished.
If a trade is detected, and the user is not an admin, look for the immediate next trade event, and if that user is not an admin, ban both users, else, do nothing to either.

I'm not sure how long the delay between trades can be. I've never seen it be more than less than a second, but I'd have to assume it could be longer. I doubt on non-trade servers you'd see so many trades that they'd overlap each other.

o0whiplash0o 11-13-2010 13:24

Re: [TF2] Block Trading
 
Why not just move the traders to spectator? That way, they're not dead weight for their team.

Leonardo 11-14-2010 07:07

Re: [TF2] Block Trading
 
this plugin is so AWESOME.
and TFItemFound very usefully to me xD.

EDIT:
and maybe need some and some safe seconds after setup? what if setup is too short...

Matheus28 11-14-2010 11:21

Re: [TF2] Block Trading
 
Quote:

Originally Posted by o0whiplash0o (Post 1348597)
Why not just move the traders to spectator? That way, they're not dead weight for their team.

I can only detect that one player traded after he traded, it's not possible to know that he is trading.

Quote:

Originally Posted by Leonardo (Post 1349118)
this plugin is so AWESOME.
and TFItemFound very usefully to me xD.

EDIT:
and maybe need some and some safe seconds after setup? what if setup is too short...

I posted it on the Snippets section. I'll add that feature in the next version.

Quote:

Originally Posted by crazydog (Post 1348336)
Some suggested feature additions:
-Different punishments (kick, shorter/longer ban)
-Maybe a warning system? 3 strikes and you're out?
-Minimum player level for plugin to become active?

Also, for the admin immunity part:
I'm not sure if this will work, but some testing can confirm it.
If a trade is detected, and the user is an admin, the next trade detected will not be punished.
If a trade is detected, and the user is not an admin, look for the immediate next trade event, and if that user is not an admin, ban both users, else, do nothing to either.

I'm not sure how long the delay between trades can be. I've never seen it be more than less than a second, but I'd have to assume it could be longer. I doubt on non-trade servers you'd see so many trades that they'd overlap each other.

I'm gonna implement that in the next version, when I have time.

Leonardo 11-14-2010 12:21

Re: [TF2] Block Trading
 
by the way
about TFItemFound
in logs I've got -1 value together with 2 (trade)
what it's mean? :S

and what about immunity for VIP's? :3 (cvar to store an aflags)

Matheus28 11-14-2010 12:32

Re: [TF2] Block Trading
 
Quote:

Originally Posted by Leonardo (Post 1349319)
by the way
about TFItemFound
in logs I've got -1 value together with 2 (trade)
what it's mean? :S

and what about immunity for VIP's? :3 (cvar to store an aflags)

Well, sometimes when you trade you also find something. And the times of the finding and the trade are different.

Also, it's from itemlogger, isn't? It doesn't support all item_found methods yet.

Leonardo 11-14-2010 12:48

Re: [TF2] Block Trading
 
it's from my edit in TF2_Stats :D
just added field to item logging ...
Code:

Format(query, sizeof(query), "INSERT INTO founditems (`STEAMID`,`TIME`,`ITEMID`,`METHOD`) VALUES ('%s','%i','%s',%d)", steamid, time, GetTime(), GetEventInt(event, "method"))


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

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