AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO] Tripmines (rxg_mines) (https://forums.alliedmods.net/showthread.php?t=201305)

mukunda 11-19-2012 17:21

[CS:GO] Tripmines (rxg_mines)
 
4 Attachment(s)
A tripmine mod for CS:GO. This is one of the mods I've written to help popularize our CS:GO server. However, the server hasn't been doing very well lately, and our community might be moving away from CS:GO. I figure its time to start releasing some of the plugins.

Originally, this was going to be your typical "on the floor" mines (like Socom's PMN mines), but I figured that would get out of hand with people hiding mines where they can't be seen (under bodies). I noticed there was already a tripmines mod available, but it didn't work with CS:GO. I figured it would be best to rewrite the mod completely to suit my tastes, but props to L. Duke for the original tripmines mod/idea!

This mod has only been tested with CS:GO!

Features
  • Placement of trip-mines with a console command, or use of the unused key bindings.
  • Mines beep a few times before arming, they make another sound and brighten their beam when they arm.
  • Mines are colored according to team, teammates can set them off, but they don't take damage.
  • The damage and radius of explosion from the mines are adjustable with two cvars.
  • The mines can be defused by holding "USE" on them. They are then picked up and can be replaced. The defuse process takes 2 seconds and makes no noise. (although the client defusing will hear the "defuse" sound)
  • Mine model included. Some people think the mine is too small, but I think it's perfect since it makes it harder for people to exploit them via shooting from a distance to set them off. (they are hard to hit if you are more than 10ft away)
  • Team filtering feature.

Console Variables
  • sm_pp_tripmines - Amount of mines to give each player at the round start. (default=0)
  • sm_pp_minedmg - The damage the mine explosion deals. (default=100)
  • sm_pp_minerad - Override value for the explosion damage radius. If 0, the radius will be computed with the damage value. (default=0)
  • sm_pp_minefilter - 0 = Detonate if anyone touches the laser, 1 = enemies and owner only, 2 = enemies only (default=0)

Configuration

A few things can be configured by editing the #defines at the top of the source file and recompiling:
  • MODEL_MINE - the model of the mine
  • MODEL_BEAM - the sprite used for the laser beam
  • LASER_WIDTH - the width of the laser beam
  • LASER_COLOR_T/CT/D - the color of the laser beam (according to team)
  • TRACE_LENGTH - the player's reach for placing mines
  • COMMAND - the console command to set a mine
  • ALTCOMMAND - an extra console command to set a mine (default = "buyammo2" which is unused in CS:GO (bound to ".")) This is so you can tell inexperienced users to "just press period", instead of explaining how to use a bind command.
Installation


Copy all files into your game folder if you have the default folder structure. It's highly recommended to mirror the material and model files to a webspace and point clients there with sv_downloadurl. Downloading files directly from the game server can be dreadfully slow (even though it's only 50KB of content)


Change Notes

Code:

// 11:48 PM 11/30/2012 - 1.0.4
//  default mines to 3
//  team filtering option
//  finer laser texture (less aliasing)
// 1:23 PM 10/30/2012 - 1.0.3beta
//  silent defusal
//  reduced defuse time (3->2 seconds)
// 5:29 PM 10/29/2012 - 1.0.2beta
//  mine defusal
// 10:37 PM 10/28/2012 - 1.0.1beta
//  reduced explosion sound volume
//  throttled explosion sounds (1 per 0.1 seconds)
//  proper explosion sound panning
//  placement on windows
// 4:12 PM 10/27/2012 - 1.0.0beta
//  initial release


zipcore 11-19-2012 20:11

Re: [CS:GO] Tripmines (rxg_mines)
 
nice

PresidentEvil 11-20-2012 01:28

Re: [CS:GO] Tripmines (rxg_mines)
 
interesting, I have a dm server but im afraid if i put it in there everyone will use them at once and the whole map will be covered in mines and no one will be able to go anywhere

if there a way to only give some a mine if lets say, they kill 5 people in a row, or for every 10 kills they get a tripmine?

hamilton5 11-20-2012 06:51

Re: [CS:GO] Tripmines (rxg_mines)
 
ha.. glad to finally see it man, thank you! :)
These are pretty cool, and I really like the added defuse part. Keep up the good work. I'll be sad to see the server go.

BOSSSSISSSS 11-21-2012 06:46

Re: [CS:GO] Tripmines (rxg_mines)
 
Hello why when I enter the command mine wrote me that "mines are disabled." I'm sorry for my English.

magik 11-21-2012 11:33

Re: [CS:GO] Tripmines (rxg_mines)
 
Sorry for my English I use a translator.

Great for the plugin, reminds me of memories.:)
Works fine on my server csgo zombie.
But maybe later if you have time, give opportunities for mines CT or T, pity that I put mines explode when I go above and same for teammates.

mukunda 11-21-2012 12:01

Re: [CS:GO] Tripmines (rxg_mines)
 
Quote:

Originally Posted by PresidentEvil (Post 1840714)
interesting, I have a dm server but im afraid if i put it in there everyone will use them at once and the whole map will be covered in mines and no one will be able to go anywhere

if there a way to only give some a mine if lets say, they kill 5 people in a row, or for every 10 kills they get a tripmine?

this seems like a specific need, a simple modification can do that, ie count kills in the player_death event and increment the player mines array

Quote:

Originally Posted by BOSSSSISSSS (Post 1841278)
Hello why when I enter the command mine wrote me that "mines are disabled." I'm sorry for my English.

by default they aren't enabled, you need to change the sm_pp_tripmines cvar

Quote:

Originally Posted by magik (Post 1841365)
Sorry for my English I use a translator.

Great for the plugin, reminds me of memories.:)
Works fine on my server csgo zombie.
But maybe later if you have time, give opportunities for mines CT or T, pity that I put mines explode when I go above and same for teammates.

I was thinking about this, I think its possible with SDKHooks to filter out teammates setting them off. If I get time I'll add that

magik 11-21-2012 13:54

Re: [CS:GO] Tripmines (rxg_mines)
 
hello

I changed the LASER_WIDTH a 0.35 laser is better, and thank you for following players for my server like to mines:)

hamilton5 11-21-2012 20:09

Re: [CS:GO] Tripmines (rxg_mines)
 
not enabled by default oh noes!

I was surprised it didn't generate a cfg file automatically.. but I guess some 'normal people' use their gamemodes files to set the vars heh ;)

I added AutoExecConfig(true, "tripmine"); to on plugin start to gen a config, and do it old fashion sourcemod style.

BOSSSSISSSS 11-22-2012 06:05

Re: [CS:GO] Tripmines (rxg_mines)
 
Sorry one more stupid question but where is it to register that would include mine?
I'm sorry for my English.


All times are GMT -4. The time now is 07:31.

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