AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Attack Marker - Colored markers which shows your teammates where to attack. (https://forums.alliedmods.net/showthread.php?t=143737)

Chanz 11-24-2010 05:52

Attack Marker - Colored markers which shows your teammates where to attack.
 
9 Attachment(s)
Attack Marker
Plan ahead, Command you team and Show where you are in an easy way!


Index:
Code:

Description
Screenshots
Requirements
Credits
Changelog
Installation
Configuration Helper
Ingame Commands
Important information
For developers or plugin approvers
Download

Description:
Colored markers which shows your teammates where to attack.
You can place or remove a marker by holding down +zoom and then press +attack.
This plugin should work in any game!

Screenshots:
https://forums.alliedmods.net/attach...1&d=1290597195

Requirements:
  • SourceMod 1.3 or higher.

Credits:
Thank you Berni, Manni, Mannis FUN House Community and SourceMod/AlliedModders LLC-Team
The beam ring code (halo) is taken out of funcommands: sm_beacon, so thank you unknown dev.

Changelog:
  • v2.4.16
    • Recode and usage of SMLib.
    • Added command "sm_attackmarker"
    • Added hotkey: zoom + flashlight
    • Added hotkey: zoom + attack
    • Attack Markers can now be removed if you look into the circle if it and use the command or the hotkeys.
    • Added "sm_banmaker" to ban someone form using the markers.
    • Added "sm_unbanmarker" to unban someone.
    • Added "sm_removeallmarkers" to remove all makers.
    • Added checks to avoid marking of ghosts in l4d2.
    • Attack Markers will lock on targeted players.
  • v1.0.4
    • Disabled timer when sm_attackmarker_enable is 0.
  • v1.0.1
    • Small bug fix with the think timer.
  • v1.0.0
    • Public release
Installation:
  • Extract the attackmarker.zip into your mod dir (ex: cstrike,hl2mp,...).
Configuration Helper:
The following can be changed in <moddir>/cfg/sourcemod/plugin.attackmarker.cfg
sm_attackmarker_enable
Enables or Disables Advanced HL2 Movement (1=Enable|0=Disabled)
sm_attackmarker_button_hotkey
sm_attackmarker_button_place
The hotkey (default: +zoom) button needs to be pressed and hold down, then press the place button (default: +attack) in order to place or remove a attackmarker.

Try to avoid changing these since, players get confused if this is different on every server.


Default values:
Hotkey:
+zoom = IN_ZOOM = 2^19 = 524288
see a full list for values here.

Place:
+use = IN_USE = 2^5 = 32
see a full list for values here.
sm_attackmarker_start_alpha
This sets how visible the marker is at start. 255=fully visible; 0=fully invisible
sm_attackmarker_fade_per_tick
This number will be subtracted from the start alpha value each tick.
sm_attackmarker_marker_tick
This sets how often the marker is redrawn (this is the marker tick rate).
Ingame Commands:
For Admins:
sm_removeallmarkers [team]
removes all markers in the team the executing admin is in, using the team parameter will override this.
sm_banmarker <target>
sm_unbanmarker <target>
bans or unbans a player from attack markers.
For every player:
sm_attackmarker [target]
places a marker where you are looking at or if a target is given (players only) on the target is a attack marker.
Important information:
  • BE SURE TO OVERRIDE THE OLD CONFIG FILE (plugin.attackmarker.cfg in your <moddir>/cfg/sorucemod/ folder)!
For developers or plugin approvers:
SMLib is a lib used by Berni and myself, this is a pre-release to provide the code for the GPL, drop it into your include directory.
If this lib is released the zip file is removed.
Download:
The provided plugin.attackmarker.cfg file is configured to enable this plugin by default.

danmon 11-25-2010 22:22

Re: Attack Marker - Colored markers which shows your teammates where to attack.
 
does this work with TF2?

Chanz 11-26-2010 04:07

Re: Attack Marker - Colored markers which shows your teammates where to attack.
 
Yes that why it has the tag:
Quote:

Plugin Game: Any
and in the description it says:
Quote:

This plugin should work in any game!
;-)

snipercup 11-27-2010 20:07

Re: Attack Marker - Colored markers which shows your teammates where to attack.
 
This works for me! I run:
PHP Code:

plugin_print
Loaded plugins
:
---------------------
0"Metamod:Source 1.8.4"
1"Mattie's EventScripts, http://mattie.info/cs, Version:2.1.0.281"
--------------------- 

PHP Code:

sm version
 SourceMod Version Information
:
    
SourceMod Version1.3.6
    SourcePawn Engine
SourcePawn 1.1jit-x86 (build 1.3.6)
    
SourcePawn APIv1 4v2 3
    Compiled on
Oct 30 2010 19:16:22
    Build ID
3065:8036343199ca
    http
://www.sourcemod.net/ 

PHP Code:

meta list
Listing 4 plugins:
[
01SourceMod (1.3.6by AlliedModders LLC
[02SDK Tools (1.3.6by AlliedModders LLC
[03BinTools (1.3.6by AlliedModders LLC
[04SDK Hooks (1.3.0by Tsunami 

On a steam synergy dedicated server on a windows system
I did edit the controls in your plugin as players arent assigned eighter red or blue, so they get all colors by default. The zoom button works for everyone. It's great.

OtterNas3 11-28-2010 16:56

Re: Attack Marker - Colored markers which shows your teammates where to attack.
 
Looks nice! Works ingame on L4D1(not tested onL4D2)

2 simple questions:
How to remove a marker?
Do they disappear after a period of time?

What would be cood:
Admins command to remove ALL markers
Admins unlimited markers (unlimited amount and time)
Non-Admins 1 marker (marker stay for XX seconds, change marker position when set on new target)


Cheers,
OtterNas3

Chanz 11-28-2010 18:33

Re: Attack Marker - Colored markers which shows your teammates where to attack.
 
Quote:

Originally Posted by OtterNas3 (Post 1359114)
How to remove a marker?

Can't atm don't think its needed since normaly you don't have much time in a game to mess around with deleting markers.
Quote:

Originally Posted by OtterNas3 (Post 1359114)
Do they disappear after a period of time?

sm_attackmarker_start_alpha
This sets how visible the marker is at start. 255=fully visible; 0=fully invisible
sm_attackmarker_fade_per_tick
This number will be subtracted from the start alpha value each tick.
sm_attackmarker_marker_tick
This sets how often the marker is redrawn (this is the marker tick rate).

example: start alpha is 100, fade per tick is 1 and tick is 0.5 (default values) then a marker is there only for about 50 sec (fading slowly away).
Quote:

Originally Posted by OtterNas3 (Post 1359114)
What would be cood:
Admins command to remove ALL markers
Admins unlimited markers (unlimited amount and time)
Non-Admins 1 marker (marker stay for XX seconds, change marker position when set on new target)

I don't want to add admin stuff because I don't see any advantage of it within the game.
But I may add a spam protection, for those little kids and an admin command to ban them from the markers.

If you bring up only some suggestions without a good reason, I don't see why to implement it. ;-) Don't get me wrong but I've developed this while playing with it, in l4d2. So its already optimized to be easy and less annoying.

Matheus28 11-29-2010 08:20

Re: Attack Marker - Colored markers which shows your teammates where to attack.
 
What about instead of per ticks, you use per seconds? Just use
PHP Code:

value*GetTickInterval(); 

in OnGameFrame

Chanz 11-29-2010 10:11

Re: Attack Marker - Colored markers which shows your teammates where to attack.
 
You didn't look into the code, did you? :)

I didn't use OnGameFrame, I've used a timer that repeads itself in the interval of sm_attackmarker_marker_tick. So if sm_attackmarker_marker_tick is 2.5, the markers are drawn every 2.5 sec.
So this plugin has a tick by itself.

English isn't my native language, so is tick the wrong word for that cvar? I know I've could have used sm_attackmarker_marker_interval, but its longer so I thought tick describes it and is short.

Matheus28 11-29-2010 11:58

Re: Attack Marker - Colored markers which shows your teammates where to attack.
 
Oh well, when I see tick I instantly imagine OnGameFrame :p

delirium_trigger 11-29-2010 16:22

Re: Attack Marker - Colored markers which shows your teammates where to attack.
 
Wait, but what if you have a weapon with a scope? Does that mean every time you scope a marker appears? That would be very annoying.

Maybe you should have a double command to activate the marker.
Maybe holding down the USE button and pressing the ZOOM button to show a marker?


All times are GMT -4. The time now is 18:24.

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