Raised This Month: $12 Target: $400
 3% 

[L4D] Points and Gift System (Shop), fork


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Plugin ID:
8239
Plugin Version:
1.19
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 10-10-2022 , 10:47   [L4D] Points and Gift System (Shop), fork
    Reply With Quote #1

    Description:
    Huge re-design and additions to the original work by (-DR-)GrammerNatzi.

    This plug-in allows clients to gain points through various accomplishments and use them to buy items and health/ammo refills. It also allows admins to gift the same things to players and grant them god mode
    What's new?
    • Integration with AutoRespawn, Special Ammo, DragoStats, Revive & CPR, Door Anti Spam plugins.
    • Unique ability: Witcher Shove
    • Unique ability: Shield
    • MySQL database
    • Transfer coins
    • Items: propane tank, oxygen tank and gascan
    • Balanced, to prevent cheating
    • Points for deal damage to tank and 1-3 places bonus for damage dealers
    • Added Resurrection (respawn)
    • Black Friday
    • Menu re-design
    • Max items per-round limitation
    • Aliases for commands
    • Translation into Russian
    • API
    Settings (ConVars):
    Can be found in: cfg/sourcemod/L4DPoints.cfg
    PHP Code:
    // Minimum players to allow earn points.
    points_min_players "3"

    // How many points for killing a certain number of infected
    points_amount_infected "2"

    // How many killed infected does it take to earn points? Headshot and minigun kills can be used to rank up extra kills.
    points_amount_infectednum "25"

    // How many points for killing a special infected.
    points_amount_specialinfected "1"

    // How many points for healing someone
    points_amount_heal "5"

    // How many points for reviving someone
    points_amount_revive "3"

    // How many points for rescuing someone from a closet
    points_amount_rescue "2"

    // How many points for rescuing someone with cpr
    points_amount_cpr "10"

    // How many points for rescuing someone with cpr + medkit
    pointsrescuemedkitcpr "25"

    // Do we want the plugin to advertise itself? 1 for short version, 2 for long, 0 for none.
    points_advertising "1"

    // How many points you get for killing a witch
    points_amount_witch "5"

    // How many extra points you get for killing a witch in one shot
    points_amount_witch_instakill "3"

    // How many stat points for rescuing someone with cpr + medkit
    ptstat_amount_cpr_medkit "5"

    // How many stat points for rescuing someone with cpr
    ptstat_amount_cpr "5"

    // How many stat points for rescuing someone from a closet
    ptstat_rescue "1"

    // How many extra kills are survivors awarded for scoring headshots? 0 = None
    points_amount_extra_headshotkills "1"

    // How many extra kills are survivors awarded for scoring minigun kills? 0 = None
    points_amount_extra_minigunkills "1"

    // How many points infected get for hurting survivors a number of times
    points_amount_infected_hurt "2"

    // How many points you get for incapacitating a survivor
    points_amount_infected_incapacitation "5"

    // How many points you get [as a smoker] when you pull a survivor
    points_amount_infected_pull "1"

    // How many points you get [as a hunter] when you pounce a survivor
    points_amount_infected_pounce "1"

    // How many points you get [as a boomer] when you vomit/explode on a survivor
    points_amount_infected_vomit "1"

    // How many seconds before the optional advertisement is displayed again
    points_advertising_ticks "80"

    // Reset points when a certain amount of rounds end? Resets at end of campaign in coop, a defined amount rounds in versus, and every round in survival
    points_reset_round "0"

    // How many rounds until reset in versus?
    points_reset_round_amount "2"

    // How many points each 1000 hp of killed tank costs
    points_price_tank_hp "1"

    // How many points take first tank damage dealer
    points_price_tank_hp_first "10"

    // How many points take second tank damage dealer
    points_price_tank_hp_second "5"

    // How many points take third tank damage dealer
    points_price_tank_hp_third "3"

    // How many points a shotgun costs
    points_price_shotgun "20"

    // How many points a sub-machine gun costs
    points_price_smg "15"

    // How many points a rifle costs
    points_price_rifle "30"

    // How many points a hunting rifle costs
    points_price_huntingrifle "30"

    // How many points an auto-shotgun costs
    points_price_autoshotgun "25"

    // How many points a pipe-bomb costs
    points_price_pipebomb "25"

    // How many points a molotov costs
    points_price_molotov "25"

    // How many points an extra pistol costs
    points_price_pistol "5"

    // How many points a bottle of pills costs
    points_price_painpills "50"

    // How many points a medkit costs
    points_price_medkit "50"

    // How many points an ammo refill costs
    points_price_refill "20"

    // How many points a heal costs
    points_price_heal "60"

    // How many points a resurrection costs
    points_price_respawn "200"

    // How many points a witcher shove costs
    points_price_witchershove "50"

    // How many points a shield costs
    points_price_shield "50"

    // How many points an oxygentank costs
    points_price_oxygentank "5"

    // How many points a gascan costs
    points_price_gascan "10"

    // How many points a propanetank costs
    points_price_propanetank "15"

    // How many points does incendiary ammo cost?
    points_price_incendiary_ammo "40"

    // How many points does bursting ammo cost?
    points_price_bursting_ammo "60"

    // How many points does armor piersing ammo cost?
    points_price_piercing_ammo "50"

    // How many points it takes to end it all
    points_price_infected_suicide "4"

    // How many points a heal costs (for infected)
    points_price_infected_heal "5"

    // How many points a boomer costs
    points_price_infected_boomer "10"

    // How many points a hunter costs
    points_price_infected_hunter "5"

    // How many points a smoker costs
    points_price_infected_smoker "7"

    // How many points a tank costs
    points_price_infected_tank "35"

    // How many points a witch costs
    points_price_infected_witch "25"

    // How many points a mini-event/mob costs
    points_price_infected_mob "18"

    // How many points a mega mob costs
    points_price_infected_mob_mega "23"

    // How many tanks can be spawned in a round
    points_limit_tanks "1"

    // How many witches can be spawned in a round
    points_limit_witches "2" 
    Commands:
    All users:
    points - show points
    usepoints - open shop menu
    shop - same (alias)
    sm_bank - same (alias)
    sm_coins - same (alias)
    sm_shop - same (alias)
    sm_buy - same (alias)
    sm_store - same (alias)
    магазин - same (alias)
    Admins:
    sm_savepoints - force populate database
    sm_clientgivepoints <#userid|name> [number of points]
    sm_clientsetpoints <#userid|name> [number of points]
    sm_clientgive <#userid|name> [item number] Numbers: 0 - Shotgun, 1 - SMG, 2 - Rifle, 3 - Hunting Rifle, 4 - Auto-shotty, 5 - Pipe Bomb, 6 - Molotov, 7 - Pistol, 8 - Pills, 9 - Medkit, 10 - Ammo, 11 - Health
    Forwards | API:
    Spoiler


    Supported games:
    - L4D1
    - L4D2
    Requirements:
    - adminmenu (included in SourceMod)
    - clientprefs (included in SourceMod)
    - geoip (included in SourceMod)
    - (optional) Special Ammo (fork by Dragokas)
    - (optional) Auto-Respawn by Dragokas
    - (optional) DragoStats by Dragokas
    - (optional) Emergency Treatment With First Aid Kit And CPR (Fork by Dragokas)

    Note: (optional) special_ammo.inc, autorespawn.inc and hx_stats.inc should be added to "include" folder to compile this plugin with a complete functionality.
    Installation:
    - Fulfill all the requirements above.
    - Install MySQL and append configuration in file: configs/databases.cfg
    Code:
    	"l4d_shop"
    	{
    		"driver"		"mysql"
    		"host"		"<replace by host name>"
    		"database"	"<replace by database name>"
    		"user"		"<replace by user name>"
    		"pass"		"<replace by password>"
    	}
    - Copy contents of attached archive to your server as is: to addons/sourcemod.

    ChangeLog

    Credits:
    - @(-DR-)GrammerNatzi - author of the original work
    Donate
    Donates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
    - Patreon
    - BitCoin
    - Ю.Money
    P.S.:
    - It's my private plugin written for myself and my Bloody Witch team.
    - Project and updates discontinued. Don't ask.
    Attached Files
    File Type: zip Shope-Forum.zip (60.3 KB, 396 views)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 01-06-2023 at 12:13.
    Dragokas is offline
    Lider99
    Member
    Join Date: Mar 2020
    Old 01-06-2023 , 02:52   Re: [L4D] Points and Gift System (Shop), fork
    Reply With Quote #2

    Good job
    __________________
    If I unintentionally insulted or offended you, then it's not me, but Google translate

    Last edited by Lider99; 01-06-2023 at 02:53.
    Lider99 is offline
    CrazMan
    Member
    Join Date: Jun 2022
    Old 01-25-2023 , 04:22   Re: [L4D] Points and Gift System (Shop), fork
    Reply With Quote #3

    Good afternoon.

    Tell me what the third paragraph does? When I press it it doesn't work.



    When I click on the item, it immediately gives me an error.

    L 01/25/2023 - 11:19:28: SourceMod error session started
    L 01/25/2023 - 11:19:28: Info (map "l4d_garage01_alleys") (file "D:\L4D-Server\left4dead\addons\sourcemod\logs\errors _20230125.log")
    L 01/25/2023 - 11:19:28: [SM] Fatal error encountered parsing translation file "special_ammo.phrases.txt"
    L 01/25/2023 - 11:19:28: [SM] Error (line 0, column 0): Stream failed to open
    L 01/25/2023 - 11:209: [SM] Exception reported: Language phrase "Incendiary" not found (arg 6)
    L 01/25/2023 - 11:209: [SM] Blaming: shope.smx
    L 01/25/2023 - 11:209: [SM] Call stack trace:
    L 01/25/2023 - 11:209: [SM] [0] Format
    L 01/25/2023 - 11:209: [SM] [1] Line 1958, H:\_To_games\Left4Dead_2\My_mods\Shope\Shope\ Shope-Forum\scripting\shope.sp:ointsSpecialMenuFu nc
    L 01/25/2023 - 11:209: [SM] [2] Line 3648, H:\_To_games\Left4Dead_2\My_mods\Shope\Shope\ Shope-Forum\scripting\shope.sp:ointsChooseMenuHan dler

    I'm sorry, I understood the mistake. =)

    Last edited by CrazMan; 01-25-2023 at 05:13.
    CrazMan is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 01-25-2023 , 04:56   Re: [L4D] Points and Gift System (Shop), fork
    Reply With Quote #4

    Quote:
    Originally Posted by Dragokas View Post
    Requirements:
    ...
    - (optional) Special Ammo (fork by Dragokas)
    ...
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    CrazMan
    Member
    Join Date: Jun 2022
    Old 01-31-2023 , 11:35   Re: [L4D] Points and Gift System (Shop), fork
    Reply With Quote #5

    Please tell me. I've earned let's say 500 points, I spent them, but after that the points do not increase even if I spent them. They should be replenished for killings.
    CrazMan is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 01-31-2023 , 12:02   Re: [L4D] Points and Gift System (Shop), fork
    Reply With Quote #6

    @CrazMan, that is your local problem. Perhaps, your server lost connection with database (bad network).
    Although, your description is little bit confusing in causal relationship.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    CrazMan
    Member
    Join Date: Jun 2022
    Old 02-09-2023 , 03:21   Re: [L4D] Points and Gift System (Shop), fork
    Reply With Quote #7

    Hello. Please tell me why I have not killed anyone yet and I already have 3000 points? And sometimes the following message is displayed in the chat #L4D_NOTIFY_VOMIY_ON



    CrazMan is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 02-09-2023 , 10:03   Re: [L4D] Points and Gift System (Shop), fork
    Reply With Quote #8

    CrazMan, я тебе уже объяснил выше почему, ты базу MySQL корректно подключил, если зайти в базу вручную (тем же phpMyAdmin, или что ты там используешь), там появляются хоть какие-то данные?

    Про эти условия читал?
    Code:
    // Reset points when a certain amount of rounds end? Resets at end of campaign in coop, a defined amount rounds in versus, and every round in survival
    points_reset_round "0"
    
    // How many rounds until reset in versus?
    points_reset_round_amount "2"
    Я не тестировал версус, или сурвайв. Это квары остались ещё от оригинального автора, я там почти ничего не менял.


    P.S. Сообщение L4D_NOTIFY_VOMIY_ON не имеет отношения к данному плагину.
    PPS. 3000 очков выдаётся по-дефолту всем новым игрокам, зашедшим на сервер впервые (в качестве бонуса).
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 02-09-2023 at 10:05.
    Dragokas is offline
    Raikage
    Junior Member
    Join Date: Jun 2020
    Old 03-31-2023 , 15:04   Re: [L4D] Points and Gift System (Shop), fork
    Reply With Quote #9

    For some reason I can't get this plugin to work on my server. I'm able to get the one from GrammerNatzi to work. Does this work for older servers?
    Raikage 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:01.


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