AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [L4D2] Points System (v1.8.0, 2016-04-11) (https://forums.alliedmods.net/showthread.php?t=278448)

evilmaniac 01-31-2016 19:05

[L4D2] Points System (v1.8.0, 2016-04-11)
 
1 Attachment(s)
  • 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/

Pyc 02-01-2016 06:17

Re: [L4D2] Points System (v1.7.5, 2016-01-31)
 
this plugin save points? or reset after reboot?

evilmaniac 02-01-2016 06:22

Re: [L4D2] Points System (v1.7.5, 2016-01-31)
 
Quote:

Originally Posted by Pyc (Post 2388991)
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.

SELL 02-01-2016 16:19

Re: [L4D2] Points System (v1.7.5, 2016-01-31)
 
Quote:

Originally Posted by evilmaniac (Post 2388992)
  • 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 ???

evilmaniac 02-01-2016 16:50

Re: [L4D2] Points System (v1.7.5, 2016-01-31)
 
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.

Krufftys Killers 02-02-2016 06:44

Re: [L4D2] Points System (v1.7.5, 2016-01-31)
 
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:11:34: [SM] Native "IsFakeClient" reported: Client 5 is not connected

evilmaniac 02-02-2016 07:23

Re: [L4D2] Points System (v1.7.5, 2016-01-31)
 
Quote:

Originally Posted by Krufftys Killers (Post 2389297)
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:11:34: [SM] Native "IsFakeClient" reported: Client 5 is not connected

Issue fixed. Thank you for pointing this out.

SELL 02-02-2016 11:58

Re: [L4D2] Points System (v1.7.5, 2016-01-31)
 
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)))

evilmaniac 02-02-2016 23:25

Re: [L4D2] Points System (v1.7.5, 2016-01-31)
 
Quote:

Originally Posted by SELL (Post 2389357)
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 ?

SELL 02-03-2016 11:14

Re: [L4D2] Points System (v1.7.5, 2016-01-31)
 
Quote:

Originally Posted by evilmaniac (Post 2389512)
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


All times are GMT -4. The time now is 23:40.

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