Giter VIP home page Giter VIP logo

udm's Introduction

Ultimate Deathmatch

Ultimate Deathmatch is a Source.Python plugin.

Its goal is to provide an enriched CSSDM-like experience, but written in Python rather than SourcePawn. See it as the version of CSSDM I always wanted.

Game Support

Game Status
Counter-Strike: Source Stable
Counter-Strike: Global Offensive Stable

See the issues list for current bugs.

Features

  • Restrict the amount of times a player can join a different team (prevent spawn spamming)
  • Weapon Menus - accessible via the chat command guns
  • Compatible with official CS:GO Deathmatch game mode
  • Buy anywhere for CS:GO - Open up the buy menu anywhere on the map, like in standard CS:GO Deathmatch mode
  • Multiple inventories: each inventory can hold either one or two weapons - easy primary/secondary only handling!
  • Admin Menu - accessible via the chat command !udm
  • Spawn Points - manageable in game via the Admin menu
  • Damage Protection (timed on spawn, but indefinitely when using the Admin menu)
  • Automatically attach or detach the silencer for weapons that can be silenced
  • Infinite ammo
  • Refill clip after a player killed an enemy with a headshot
  • Noblock (see the config file below)
  • Give back High Explosive grenade (4 options - see the config file below)
  • Restore the killer's health to 100HP if they killed an enemy with the knife (see the config file below)

Check out the tech demo: https://www.youtube.com/watch?v=srTt0N0AakQ

Weapon Menus and Inventories

Have a look at the guns command screenshots for CS: GO. You can have an unlimited amount of inventories and switch between them:

# Edit or equip the first inventory
guns 1

# The first inventory is now selected and the player will spawn with those weapons.
# The command guns without any argument will now default to inventory 1.

# Edit the first inventory
guns


# Edit or equip the second inventory
guns 2

# The command guns without any argument will now default to inventory 2.
guns

# ...

If you have selected an inventory and drop a weapon on purpose, e.g. pressing the G button on your keyboard, the weapon will be removed from your inventory. Dropping all weapons will enable random weapons until you select an inventory item via guns [<inventory>].

Admin Menu

Have a look at the !udm command screenshots for CS: GO. As soon as you open up the Admin menu, you will lose all your current weapons, but godmode will be enabled for you until you close the menu. Currently only the Spawn Points Manager is implemented: you can manage your spawn points in game!

Adding an admin

Adding admins is quite simple using the following syntax: sp auth permission player add <userid> udm.admin

  1. Join your server
  2. In any console - client or server - type status and make note of the value for your userid (i.e.: 2)
  3. At the server console, type sp auth permission player add 2 udm.admin
  4. You should see a message like Granted permission "udm.admin" to <your player name>.

You are good to go! For more information on managing admins, please refer to the Source.Python Auth Configuration wiki page.

Installation

  1. Install Source.Python: Build #625 is required for this plugin
  2. Download the latest UDM release and unzip its contents to the game server's root folder (i.e.: cstrike for Counter-Strike: Source, csgo for Counter-Strike: Global Offensive)
  3. Put sp plugin load udm into your server configuration file (i.e.: autoexec.cfg) - this can be any file that gets read after a map has changed
  4. Change the map

Configuration File

The configuration file ../cfg/source-python/udm.cfg will automatically be created for you after the plugin has loaded for the first time:

// Ultimate Deathmatch plugin configuration file
// ----------------------------------
//    * Respawn
// ----------------------------------

// Default Value: 2
// The respawn delay (in seconds).
   udm_respawn_delay 2

// ----------------------------------
//    * Spawn Protection
// ----------------------------------

// Default Value: 2
// The spawn protection delay (in seconds).
   udm_spawn_protection_delay 2

// ----------------------------------
//    * Infinite Ammo
// ----------------------------------

// Default Value: 1
// Enable infinite ammo?
   udm_enable_infinite_ammo 1

// ----------------------------------
//    * NoBlock
// ----------------------------------

// Default Value: 1
// Enable NoBlock mode for players?
   udm_enable_noblock 1

// ----------------------------------
//    * Kill Rewards
// ----------------------------------

// Default Value: 1
// Refill the players's clip following a headshot kill?
   udm_refill_clip_on_headshot 1


// Default Value: 1
// Restore the players's health to 100HP following a knife kill?
   udm_restore_health_on_knife_kill 1

// ----------------------------------
//    * HE Grenade Behavior
// ----------------------------------

// Options
//   * 0 = Off
//   * 1 = Equip on spawn
//   * 2 = Equip on spawn and on each HE grenade kill
//   * 3 = Equip on spawn and after each detonation
// Default Value: 2
// High Explosive grenade behavior
   udm_equip_hegrenade 2

// ----------------------------------
//    * Team Changes Management
// ----------------------------------

// Default Value: 2
// The maximum amount of times a players is allowed to change their team per
//   round.
   udm_team_changes_per_round 2


// Default Value: 1.5
// Time penalty (in minutes) for exceeding the maximum team change count.
   udm_team_changes_reset_delay 1.5

// ----------------------------------
//    * Say Commands
// ----------------------------------

// Default Value: "!udm"
// The say command used to open the admin menu.
   udm_saycommand_admin "!udm"


// Default Value: "guns"
// The say command used to open the weapons menu.
   udm_saycommand_guns "guns"

Be sure to reload the plugin via sp plugin reload udm after you have done any changes to that configuration file.

Enable or disable weapons for players to choose

Open the weapon data file for the game. You can disable weapons by commenting them:

...
glock = "Glock 18"
usp_silencer = "USP-S"
# deagle = "Desert Eagle"
...

This would disable the weapon Desert Eagle. To re-enable it remove the comment:

...
glock = "Glock 18"
usp_silencer = "USP-S"
deagle = "Desert Eagle"
...

Be sure to reload the plugin via sp plugin reload udm after you have done any changes to the INI file.

Enjoy!

udm's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

udm's Issues

Clip of M249 Para is set to 0 after a headshot

Date          : 2017-12-22 14:02:12.236519
OS            : Windows-7-6.1.7601-SP1
Game          : css
SP version    : unversioned
Server plugins:
   00: Source.Python, (C) 2012-2016, Source.Python Team.
SP plugins:
   00: udm, 1.8.3, https://forums.sourcepython.com/viewtopic.php?f=7&t=1643

Buy Menu inventory bug

If you have no weapons selected and use the buy menu to buy only a primary weapon, you will still respawn with your standard pistol. This does not affect the guns command, though.

This bug only occurs in CS:GO.

Inefficient ammo refill & auto-silence implementation

Due to the fact that I didn't know better, the current implementation of ammo refill & auto-silence weapons could potentially cause lags and poor responsiveness in a 'real world' public server.

Do not use the plugin until I figure out a way to improve the plugin's performance!

Unable to add other grenades, and using !udm leaves you without weapons, even after 'guns'

This is my first attempt at using SourcePython, so forgive any lapses in setup. I'm using the latest build #695, and fetched the files from your github rep instead of the release zip. Couple of problems :

  1. I can only use the HE grenade. Is there any way you can enable the other grenade types too?
  2. After using !udm for test purposes, I found that I was stuck without weapons until I reconnected to the server. Using "guns" didn't help.

Dropped weapons are not removed

Dropped weapons are not removed on Windows due to an exception in on_post_drop_weapon. There are two different exception, caused by the same reason.

[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\plugins\udm\udm.py", line 312, in on_post_drop_weapon
    player = make_object(PlayerEntity, stack_data[0])

ValueError: Pointer is NULL.
[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\plugins\udm\udm.py", line 312, in on_post_drop_weapon
    player = make_object(PlayerEntity, stack_data[0])
  File "..\addons\source-python\packages\source-python\entities\_base.py", line 218, in _obj
    return cls(index_from_pointer(ptr))

ValueError: Conversion from "Pointer" (<_memory.Pointer object at 0x1DD8C470>) to "Index" failed.

The reason and a workaround for this is described here:
https://forums.sourcepython.com/viewtopic.php?p=7542#p7542

Since you are delaying the removal code anyway, you might want to use a pre-hook.

ValueError: Property "m_bSilencerOn" not found for entity type "weapon_ak47"

I haven't figured out yet when this happens, but it seems that there are some cases that pass all your checks.

[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\plugins\udm\udm.py", line 303, in on_pre_bump_weapon
    if weapon.get_property_bool('m_bSilencerOn') != inventory_item.silencer_option:
  File "..\addons\source-python\packages\source-python\entities\_base.py", line 377, in get_property_bool
    return self._get_property(name, 'bool')
  File "..\addons\source-python\packages\source-python\entities\_base.py", line 535, in _get_property
    name, self.classname))

ValueError: Property "m_bSilencerOn" not found for entity type "weapon_ak47"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.