View Single Post
Author Message
smithxxl
Member
Join Date: Jan 2008
Location: Indianapolis, IN
Old 04-21-2009 , 21:35   [CS:S] Admin Buy
Reply With Quote #1

Admin Buy
Version: 1.04


Description

This plugin is specifically designed for Counter-Strike Source to allow admins and subscribers the ability to buy any of guns on the opposing team. It can deduct from the player's account or free to the buyer. Only players can use the admin buy system when in the map's buy zone. It will only show/give weapons that are not restricted if restricted by Liam's YouzAMenace's Weapon Restrict ( ).


Installation
  1. Click 'GetPlugin' below, download, and upload to the addons/sourcemod/plugins/ folder.
  2. Restart the server, change map, or run 'sm plugins load adminbuy' from rcon.
  3. Configure cvars as needed. Config will be generated in cfg/sourcemod/adminbuy.cfg

Commands

  • Console
    • sm_buy [weaponkey] - This command will bring up the buy menu if weaponkey is excluded. See weapon keys below.
  • Chat Commands
    • !buy [weaponkey] - same as sm_buy

CVARS
  • sm_buy_enabled - Enables/Disabled the Admin Buy Command <0=Off | 1=On with cost | 2=On Without Cost> (1=default)
  • sm_buy_denymsg - Message to reply when player isn't a subscriber/vip/admin. ("This Buy feature is limited to server supportors only. Please visit website for details."=default)
  • sm_buy_adminflags - Admin Flag(s) to allow changing cash. o=CustomFlag_1 p=CustomFlag_2 etc. (s=default)

ToDo
  • [Medium] Team Limit - Support counting of how many a team has for weapon restrictions for Liam's YouzAMenace's Weapon Restriction plugin.
  • [Medium] Translations - Translations Config and strings for english, german, and dutch.
  • [Low] All guns menu - Support and cvar for the buy menu to show all weapons and not just the opposing team's.

Known Issues
  • [Low] Console clutter - Because Sourcemod takes '!' and '/' items in chat and posts automatically calls them if registered console commands, !buy did not work when sm_buy was registered. So it checks for !buy manually. Even though this plugin captures it manually, calling !buy or sm_buy will cause some clutter in the clients' console. It doesn't hurt anything.

Weapon Keys
  • weapon_glock -or- glock
  • weapon_usp -or- usp
  • weapon_p228 -or- p228
  • weapon_deagle -or- deagle
  • weapon_elite -or- elite
  • weapon_fiveseven -or- fiveseven
  • weapon_galil -or- galil
  • weapon_ak47 -or- ak47
  • weapon_scout -or- scout
  • weapon_sg552 -or- sg552
  • weapon_awp -or- awp
  • weapon_g3sg1 -or- g3sg1
  • weapon_famas -or- famas
  • weapon_m4a1 -or- m4a1
  • weapon_aug -or- aug
  • weapon_sg550 -or- sg550
  • weapon_m3 -or- m3
  • weapon_xm1014 -or- xm1014
  • weapon_mac10 -or- mac10
  • weapon_tmp -or- tmp
  • weapon_mp5navy -or- mp5navy
  • weapon_ump45 -or- ump45
  • weapon_p90 -or- p90
  • weapon_m249 -or- m249

Changelog
  • 1.04 - Changed to use YouzAMenace's Weapon Restrict
  • 1.03 - Fixed Famas with wrong default team
  • 1.02 - Moved Foreign CVars to OnPluginsLoaded to fix restricted weapons in buy menu
  • 1.01 - Fixed incorrect return value on from BuyAllowed
  • 1.0 - Created plugin
Attached Files
File Type: sp Get Plugin or Get Source (adminbuy.sp - 4301 views - 10.0 KB)

Last edited by smithxxl; 08-01-2010 at 00:03. Reason: v1.04 update
smithxxl is offline