Raised This Month: $202 Target: $400
 50% 

[L4D2] Points System (v1.8.0, 2016-04-11)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
evilmaniac
SourceMod Donor
Join Date: May 2012
Plugin ID:
5028
Plugin Version:
1.8.0
Plugin Category:
Fun Stuff
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows members of either team (Survivors or Infected) to make purchases relevant to them. Purchases are made through points which are gained by aiding one's team.
    Old 01-31-2016 , 19:05   [L4D2] Points System (v1.8.0, 2016-04-11)
    Reply With Quote #1

    • Description
      This is a fork from McFlurry's Points System. It re-introduces the ps_bess.sp module and corrects several issues in both the plugin and the module. If you are unaware of the plugin's functionality, it simply allows members of either team (Survivors or Infected) to make purchases relevant to them. Purchases are made through points which are gained by aiding one's team.
    • Feature List
      • Purchase items through a menu
      • Purchase items through chat based commands e.g. !buy pills (requires ps_bess.smx)
    • Command List
      Code:
        • buy: Opens a menu which lists items available for purchase
        • buystuff: Alias to buy command
        • repeatbuy: Purchase the last item bought once again
        • points: Display your current points
        • heal: Admin command. Heals a player instantly. Not to be confused with heals through the !buy command
        • setpoints: Admin command. Sets the points of a player to a given value
        • givepoints: Admin command. Increments the points of a player by a given value.
    • Change-log
      Code:
        2016-04-11
        • Fixed an exploit where players can set the survivor team on fire, switch to SI, and reap a large number of points
        • Implemented restrictions to disallow members of a team to purchase items which may vandalize the success of one's own team.
      
        2016-02-16
        • Fixed an issue where the price of certain items was different between multiple special infected
      
        2016-02-06
        • Begun moving towards transitional syntax
        • Reorganized some code
      
        2016-02-02b
        • Fixed an issue where ps_bess would continue to function and process purchases even when the points system is disabled
        • Introduced a new native function which allows modules to verify the status of the points system
        • ps_bess: slight code clean up
      
        2016-02-02
        • Fixed an issue where IsFakeClient() is called without checking if the client is connected (thereby resulting in a crash)
        • Removed dead code
        • Changed the default value of several CVARs
      
        2016-01-31
        • Reintroduced ps_bess support
        • Fixed an issue where ps_bess would increase the amount of points deducted with each consecutive use when purchasing a heal as a tank
        • Fixed an issue where survivors would be charged twice when purchasing a heal through ps_bess
        • Added 'heal' as an additional shortcut to ps_bess, allowing players to use !buy heal as-well as !buy fheal
        • Improved code readability
        • Reduced coupling between ps_bess & l4d2_points_system
        • Several additional bug fixes have been made
    • Installation
      Code:
        • Using the Zip File:
          Extract the zip file inside your sourcemod folder.
      
        • Manual Installation:
          All .phrases.txt files must be placed inside the sourcemod/translations folder.
          All .smx files must be placed inside the sourcemod/plugins folder
    • Plans
      Code:
        • Saving points: Allows players to save their points for a period of time (implemented but not yet integrated)
        • Points cap: Sets a maximum to the amount of points a player can have (implemented but not yet integrated)
        • Rewrite legacy menu code
    • Credits:
      Source can be found here: https://bitbucket.org/evilmaniac/points-system/
    Attached Files
    File Type: zip points-system.zip (57.5 KB, 1207 views)
    __________________

    Last edited by evilmaniac; 04-11-2016 at 17:29. Reason: Version update
    evilmaniac is offline
    Pyc
    Member
    Join Date: Jan 2014
    Old 02-01-2016 , 06:17   Re: [L4D2] Points System (v1.7.5, 2016-01-31)
    Reply With Quote #2

    this plugin save points? or reset after reboot?
    Pyc is offline
    evilmaniac
    SourceMod Donor
    Join Date: May 2012
    Old 02-01-2016 , 06:22   Re: [L4D2] Points System (v1.7.5, 2016-01-31)
    Reply With Quote #3

    Quote:
    Originally Posted by Pyc View Post
    this plugin save points? or reset after reboot?
    • Points will be reset on mapchange if you have the l4d2_points_reset_mapchange cvar configured
    • A player's points will be reset when the player disconnects from the server
    • Every player's points will be reset if the server is restarted.

    Optional points saving across server-restarts and player sessions will be added in the next version.
    __________________

    Last edited by evilmaniac; 02-01-2016 at 06:24.
    evilmaniac is offline
    SELL
    Junior Member
    Join Date: Feb 2016
    Old 02-01-2016 , 16:19   Re: [L4D2] Points System (v1.7.5, 2016-01-31)
    Reply With Quote #4

    Quote:
    Originally Posted by evilmaniac View Post
    • Points will be reset on mapchange if you have the l4d2_points_reset_mapchange cvar configured
    • A player's points will be reset when the player disconnects from the server
    • Every player's points will be reset if the server is restarted.

    Optional points saving across server-restarts and player sessions will be added in the next version.
    I noticed a mistake when I did not a team the Points reset to zero, and there is a possibility to add an item transfer points to another player ???
    SELL is offline
    evilmaniac
    SourceMod Donor
    Join Date: May 2012
    Old 02-01-2016 , 16:50   Re: [L4D2] Points System (v1.7.5, 2016-01-31)
    Reply With Quote #5

    By default, points reset is enabled at the end of each round. Changing the CVAR in left4dead2/cfg/sourcemod/l4d2_points_system.cfg to the following, will disable it.

    Code:
    l4d2_points_reset_mapchange ""
    At this time, I have no intention of adding the ability to transfer items to others players. It is possible though.
    __________________
    evilmaniac is offline
    Krufftys Killers
    Senior Member
    Join Date: Jan 2014
    Old 02-02-2016 , 06:44   Re: [L4D2] Points System (v1.7.5, 2016-01-31)
    Reply With Quote #6

    L 02/02/2016 - 00:11:08: SourceMod error session started
    L 02/02/2016 - 00:11:08: Info (map "dw_otherworld") (file "errors_20160202.log")
    L 02/02/2016 - 00:11:08: [SM] Native "IsFakeClient" reported: Client 6 is not connected
    L 02/02/2016 - 00:11:08: [SM] Displaying call stack trace for plugin "l4d2_points_system.smx":
    L 02/02/2016 - 00:11:08: [SM] [0] Line 492, l4d2_points_system.sp::IsClientBot()
    L 02/02/2016 - 00:11:08: [SM] [1] Line 1055, l4d2_points_system.sp::handleTankKilledPoints ()
    L 02/02/2016 - 00:11:08: [SM] [2] Line 1061, l4d2_points_system.sp::handleTankKilledPoints ()
    L 02/02/2016 - 00:11:08: [SM] [3] Line 1061, l4d2_points_system.sp::handleTankKilledPoints ()
    L 02/02/2016 - 00:11:08: [SM] [4] Line 1061, l4d2_points_system.sp::handleTankKilledPoints ()
    L 02/02/2016 - 00:11:08: [SM] [5] Line 1061, l4d2_points_system.sp::handleTankKilledPoints ()
    L 02/02/2016 - 00:11:08: [SM] [6] Line 1061, l4d2_points_system.sp::handleTankKilledPoints ()
    L 02/02/2016 - 00:11:08: [SM] [7] Line 1049, l4d2_points_system.sp::handleTankKilled()
    L 02/02/2016 - 00:11:08: [SM] [8] Line 1077, l4d2_points_system.sp::Event_TankDeath()
    L 02/02/2016 - 00:114: [SM] Native "IsFakeClient" reported: Client 5 is not connected
    Krufftys Killers is offline
    evilmaniac
    SourceMod Donor
    Join Date: May 2012
    Old 02-02-2016 , 07:23   Re: [L4D2] Points System (v1.7.5, 2016-01-31)
    Reply With Quote #7

    Quote:
    Originally Posted by Krufftys Killers View Post
    L 02/02/2016 - 00:11:08: SourceMod error session started
    L 02/02/2016 - 00:11:08: Info (map "dw_otherworld") (file "errors_20160202.log")
    L 02/02/2016 - 00:11:08: [SM] Native "IsFakeClient" reported: Client 6 is not connected
    L 02/02/2016 - 00:11:08: [SM] Displaying call stack trace for plugin "l4d2_points_system.smx":
    L 02/02/2016 - 00:11:08: [SM] [0] Line 492, l4d2_points_system.sp::IsClientBot()
    L 02/02/2016 - 00:11:08: [SM] [1] Line 1055, l4d2_points_system.sp::handleTankKilledPoints ()
    L 02/02/2016 - 00:11:08: [SM] [2] Line 1061, l4d2_points_system.sp::handleTankKilledPoints ()
    L 02/02/2016 - 00:11:08: [SM] [3] Line 1061, l4d2_points_system.sp::handleTankKilledPoints ()
    L 02/02/2016 - 00:11:08: [SM] [4] Line 1061, l4d2_points_system.sp::handleTankKilledPoints ()
    L 02/02/2016 - 00:11:08: [SM] [5] Line 1061, l4d2_points_system.sp::handleTankKilledPoints ()
    L 02/02/2016 - 00:11:08: [SM] [6] Line 1061, l4d2_points_system.sp::handleTankKilledPoints ()
    L 02/02/2016 - 00:11:08: [SM] [7] Line 1049, l4d2_points_system.sp::handleTankKilled()
    L 02/02/2016 - 00:11:08: [SM] [8] Line 1077, l4d2_points_system.sp::Event_TankDeath()
    L 02/02/2016 - 00:114: [SM] Native "IsFakeClient" reported: Client 5 is not connected
    Issue fixed. Thank you for pointing this out.
    __________________
    evilmaniac is offline
    SELL
    Junior Member
    Join Date: Feb 2016
    Old 02-02-2016 , 11:58   Re: [L4D2] Points System (v1.7.5, 2016-01-31)
    Reply With Quote #8

    PHP Code:
    HookEvent("player_team"Reset_Points);

    public 
    Action:Reset_Points(Handle:eventString:event_name[], bool:dontBroadcast)
    {
        new 
    client GetClientOfUserId(GetEventInt(event"userid"));
        
    points[client] = 0;

    I am not strong in plug-ins, but I think this code can be added. this is when the transition from command to command the survivors infected, then Points are not saved. Only here I Do not Know How To Fix team !takeover then also resets Points)))

    Last edited by SELL; 02-02-2016 at 12:03.
    SELL is offline
    evilmaniac
    SourceMod Donor
    Join Date: May 2012
    Old 02-02-2016 , 23:25   Re: [L4D2] Points System (v1.7.5, 2016-01-31)
    Reply With Quote #9

    Quote:
    Originally Posted by SELL View Post
    PHP Code:
    HookEvent("player_team"Reset_Points);

    public 
    Action:Reset_Points(Handle:eventString:event_name[], bool:dontBroadcast)
    {
        new 
    client GetClientOfUserId(GetEventInt(event"userid"));
        
    points[client] = 0;

    I am not strong in plug-ins, but I think this code can be added. this is when the transition from command to command the survivors infected, then Points are not saved. Only here I Do not Know How To Fix team !takeover then also resets Points)))
    I'm not sure what exactly you are trying to do. Are you trying to reset a player's points when they switch teams, but not when they use the !takeover command ?
    __________________
    evilmaniac is offline
    SELL
    Junior Member
    Join Date: Feb 2016
    Old 02-03-2016 , 11:14   Re: [L4D2] Points System (v1.7.5, 2016-01-31)
    Reply With Quote #10

    Quote:
    Originally Posted by evilmaniac View Post
    I'm not sure what exactly you are trying to do. Are you trying to reset a player's points when they switch teams, but not when they use the !takeover command ?
    when they change team, then Points are reset. using the instructions above code. but how to do so by using the command !takeover Points are not reset
    SELL 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 01:35.


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