[L4D & L4D2] Survivor Starter Pack (v1.4, 08-30-2018)
10 Attachment(s)
Donate to Motivate
Introduction This is just a simple plugin I wrote because I was bored. Basically, server owners can set what loadouts each player starts with. Bots share the same loadout since their "ID" is just "BOT" so there's no point in even setting a loadout for each of them. How It Works When a player spawns as a survivor, the plugin looks for their Steam ID in the config file. If it's not listed, the player will be given the default pack. When a player goes AFK, the bot that replaces the player is given a new loadout. When a player replaces the bot, the player will get a new set of their own loadout. Basically, like this: Player spawns and is given a shotgun. When player goes afk, bot gets an smg. Player comes back and replaces bot, he/she gets a shotgun again. When a bot spawns as a survivor, the plugin looks for the "bot" ID in the config file. If it's not listed, the bot will be given the default pack. When a player takes over the bot, the player will be given a new loadout. Basically, like this: Bot spawns and is given an smg. When player takes over the bot, player gets a shotgun. Player leaves and is replaced by a bot, the bot is given an smg. Command sm_starter <#userid|name> "item1,item2,item3,item4,item5" Example: sm_starter @me "smg,pistol,pain_pills" (Character limit for loadout is 325 including commas.) This command will save the specified starter pack for the player's Steam ID in the config. It will take effect the next time the player_spawn event is fired for that player. (i.e. Player goes afk or vice versa.) KeyValues Settings PHP Code:
I'm not sure. Let me know. Notes 1. The config file will be generated in the default cfg/sourcemod folder. 2. Use the sm_starter command to add new Steam IDs to the config file. (You can still manually add Steam IDs yourself out of the game.) 3. The bots are given a specified loadout when a player goes AFK and vice-versa and when they spawn. This is done so that bots can have their own loadouts as well. Requests I don't know. Post one below and I'll look into it. Requirement SM 1.8+ Installation 1. Place survivor_starter_pack.smx inside plugins folder. Changelog
Spoiler
|
Re: [L4D & L4D2] Survivor Starter Pack
Very nice... Thanks Crasher :bacon!:
|
Re: [L4D & L4D2] Survivor Starter Pack
Doesn't seem to be working. Nothing in the error logs either.
I simply have rifle_ak47 in my starter kit and I never load in with it or any other items. Not sure what the deal is. |
Re: [L4D & L4D2] Survivor Starter Pack
Same here when plugin reloaded or server restarted i still get default load pistol only.
Put this in and added my Steam ID still get same default load out, have sourcemod 1.9. "Survivor Starter Pack" { "General" { "Plugin Enabled" "1" // 0: Plugin is off, 1: Plugin is on "Default Pack" "smg,pistol,pain_pills" // This loadout is used when the player's Steam ID isn't listed below... } // This is my Steam ID as an example... "STEAM_0:1:48199803" { "Starter Pack" "autoshotgun,knife,molotov,first_aid_kit,adre naline" } } Thank you Crasher_3637 |
Re: [L4D & L4D2] Survivor Starter Pack
Your plugin keeps overflowing the console with this message
Quote:
|
Re: [L4D & L4D2] Survivor Starter Pack
@Sev, I may need to hook some events. What gamemodes have you tried this on?
@rickfishin, I'll check it out. @grimxxl, I'll work on a fix. |
Re: [L4D & L4D2] Survivor Starter Pack
Quote:
|
Re: [L4D & L4D2] Survivor Starter Pack
Crasher use something like this to fix your item giving...I used this method to fix starting backpack contents for my backpack plugin.
Code:
//THIS EVENT FIRES WHEN PLAYERS FIRST SPAWN ON THE SERVER AND WHEN A NEW CAMPAIGN STARTS |
Re: [L4D & L4D2] Survivor Starter Pack
Quote:
|
Re: [L4D & L4D2] Survivor Starter Pack (v1.1, 08-15-2018)
Version 1.1 is out!
1. Fixed the config file being refreshed constantly while spamming the console. (Thanks grimxxl for the report!) 2. Fixed the plugin not working properly. (Thanks MasterMind420 for the new method and Sev for the report!) 3. Added event hooks to give players/bots the proper loadout between AFK transitions. |
All times are GMT -4. The time now is 01:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.