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

[TF2] Block Trading


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Matheus28
Senior Member
Join Date: Aug 2009
Plugin ID:
2067
Plugin Version:
1.2
Plugin Category:
Server Management
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    If a player effectuates a trade when not in setup, he is banned for 5 minutes.
    Old 11-12-2010 , 21:45   [TF2] Block Trading
    Reply With Quote #1

    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)
    Attached Files
    File Type: sp Get Plugin or Get Source (blocktrading.sp - 1266 views - 3.5 KB)

    Last edited by Matheus28; 02-19-2011 at 09:00.
    Matheus28 is offline
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 11-12-2010 , 23:54   Re: [TF2] Block Trading
    Reply With Quote #2

    Well that's just mean.
    bl4nk is offline
    Matheus28
    Senior Member
    Join Date: Aug 2009
    Old 11-13-2010 , 00:00   Re: [TF2] Block Trading
    Reply With Quote #3

    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...
    Matheus28 is offline
    crazydog
    AlliedModders Donor
    Join Date: Jan 2006
    Old 11-13-2010 , 04:06   Re: [TF2] Block Trading
    Reply With Quote #4

    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.

    Last edited by crazydog; 11-13-2010 at 04:17.
    crazydog is offline
    o0whiplash0o
    Member
    Join Date: Jun 2010
    Old 11-13-2010 , 13:24   Re: [TF2] Block Trading
    Reply With Quote #5

    Why not just move the traders to spectator? That way, they're not dead weight for their team.
    o0whiplash0o is offline
    Leonardo
    Veteran Member
    Join Date: Feb 2010
    Location: 90's
    Old 11-14-2010 , 07:07   Re: [TF2] Block Trading
    Reply With Quote #6

    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...
    __________________

    Last edited by Leonardo; 11-14-2010 at 07:34.
    Leonardo is offline
    Matheus28
    Senior Member
    Join Date: Aug 2009
    Old 11-14-2010 , 11:21   Re: [TF2] Block Trading
    Reply With Quote #7

    Quote:
    Originally Posted by o0whiplash0o View Post
    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 View Post
    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 View Post
    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.
    Matheus28 is offline
    Leonardo
    Veteran Member
    Join Date: Feb 2010
    Location: 90's
    Old 11-14-2010 , 12:21   Re: [TF2] Block Trading
    Reply With Quote #8

    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? (cvar to store an aflags)
    __________________
    Leonardo is offline
    Matheus28
    Senior Member
    Join Date: Aug 2009
    Old 11-14-2010 , 12:32   Re: [TF2] Block Trading
    Reply With Quote #9

    Quote:
    Originally Posted by Leonardo View Post
    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? (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.
    Matheus28 is offline
    Leonardo
    Veteran Member
    Join Date: Feb 2010
    Location: 90's
    Old 11-14-2010 , 12:48   Re: [TF2] Block Trading
    Reply With Quote #10

    it's from my edit in TF2_Stats
    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"))
    __________________
    Leonardo 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:12.


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