Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › General › Requests for DoD Plugins › Locking spec on original team players
14 posts, 5 people · 5,493 views Thread Rating: ★★★★★
closedLocking spec on original team players
Started by Kristiansen on 02-08-2009, 12:21 AM
K Kristiansen
started this thread
Posts: 71
Threads: 18
Joined: Jan 2008
02-08-2009, 12:21 AM #1

I wondered if it was possible to create something that would lock spectator views on the players on the team the player came from?nnErm. To exemplify this I should explain that it would be useful in a "realism game" if anyone of you have tried that. Basically upon death you join spec (as in you only get one life, right.). But unfortunately there is a wide use of "ghosting", i.e. dead players look around the map as spectator and tells the remaining teammates of enemy locations through steam friends, ventrilo etc.nnHowever I'm reluctant to install a total blackout thing, I got the specfade and deathfade mod from this forum and put the alpha values to 235, which gives everyone a vague view of whats going on but more difficult to ghost. Full blackout is really annoying and makes people leave and ruins the intensity of watching the show as spectator. However it could still be exploited and ghosted this way. And through full blackout one could also use minimap icons and spot locations (hard).nnSo, what I was thinking of is a plugin that makes people coming from e.g. axis, only able to spec axis players. Locked person view or whatever. I think this is what you get between respawns, right?nnAs far as my largely insufficient knowledge of this stuff goes, I think that specators coming from both teams technically goes into "team 3", right? So I guess one would have to make something that "remembers" what team you come from to make this.nnIs this possible?

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
02-08-2009, 06:46 AM #2

this is certainly not the best solution but try this http://forums.alliedmods.net/showthread.php?p=485299 and set the respawn factor really high and this for restarting the game/round this: https://www.dodplugins.net/forums/showthread.php?t=1474 rnrnhowever i think there are some kinda server cvar that makes u only spec your team mates, if so enable it... well again its not a good solution especialy not if iam wrong about the server cvar lol. But it will work for some testing and see whats going to happen... someone requested a "join spec on death" plugin before, and i made something that worked ok, but was a bit gay anyway cuz when u killed ppl it look like u killed a spectator cuz it switched ppl to spec too fast haha, but i can dig that up again and fix it later today if u want...rnrnrn*EDIT*rnrnwell if u join team 3 (spec) u do no longer belong on a team and here by u would be able to spec all, i think lol thats why i wanted you to set the respawn factor high.. lol confused?, sry i just woke up...rnrncheers

K Kristiansen
started this thread
Posts: 71
Threads: 18
Joined: Jan 2008
02-08-2009, 12:25 PM #3
rnrn*EDIT*rnrnwell if u join team 3 (spec) u do no longer belong on a team and here by u would be able to spec all, i think lol thats why i wanted you to set the respawn factor high.. lol confused?, sry i just woke up...rnrncheers
rnrnYep that's what I thought too, so I guess the plugin (if this is possible) would had to "remember" what team a player came from.rnYep there is a cvar making you only able to spec your own team. And we do have a pretty neat config that by only changing server variables makes the respawn time really long and keep people "dead". However noone is used to this and it turned out to be really confusing. The other team can't see who's dead and not easily.

meathead
posted here
Posts: 337
Threads: 23
Joined: Aug 2007
02-08-2009, 01:51 PM #4

No time to sight see with synthetics new plug-in.rnhttps://www.dodplugins.net/forums/showthread.php?t=1521&highlight=respawn

K Kristiansen
started this thread
Posts: 71
Threads: 18
Joined: Jan 2008
02-08-2009, 02:18 PM #5

Thanks for grasping the purpose of this plugin request, lol. I'm not looking for something between respawns, I'm talking about when you are in spectator.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
02-08-2009, 07:32 PM #6

lol @ the responses.. i understood what you were asking fornnnthis is far from perfect but give it a try..n

nn#include <amxmodx>n#include <fakemeta>n#include <dodx>nn#define VERSION "1.0"nn#define SPEC    3nnnew p_pluginnnew g_specteam[33],g_currteam[33]nnpublic plugin_init()n{n    register_plugin("DoD Spectate Team",VERSION,"AMXX DoD Team")nn    p_plugin = register_cvar("dod_spectateteam","1")n}nnpublic dod_client_changeteam(id,team,oldteam)n{n    if(is_user_connected(id))n        {        n        g_specteam[id]=oldteamn        g_currteam[id]=teamn        n        if(team==SPEC && (oldteam==ALLIES || oldteam==AXIS))n            set_task(0.1,"funcCheckSpec",id,_,_,"b")n        else if(oldteam==SPEC && task_exists(id))n            remove_task(id)n        }n}nnpublic funcCheckSpec(id)n{n    if(get_pcvar_num(p_plugin) && is_user_connected(id) && g_currteam[id]==SPEC && g_specteam[id])n        {n        new spec_id = pev(id,pev_iuser2)n            n        if(g_specteam[id] != g_currteam[spec_id])n            client_cmd(id,"wait;+attack;wait;-attack")n        }n}
K Kristiansen
started this thread
Posts: 71
Threads: 18
Joined: Jan 2008
02-09-2009, 01:13 PM #7

It works partly, if you try you can still spec opposite team but it will cycle through all the opposite team's players really fast and go back to your own team. I can live with that, but have you tried going free look? Gives you spasm to watch it lol. I guess its the closest you can get?

Tank
posted here
Posts: 581
Threads: 59
Joined: Jan 2007
02-09-2009, 02:00 PM #8
mp_forcecamera 4rnmp_allowroaming 0rn
rnrnWhat if you use above stated cvars in your server.cfg?rnrnAllowroaming set at 0 will people not be able to spec in free roam. The mp_forcecamera is set at 4, meaning you can only spec your own team

K Kristiansen
started this thread
Posts: 71
Threads: 18
Joined: Jan 2008
02-09-2009, 02:04 PM #9

If this works I feel dumb lol. Hold on. Oh btw, by "your own team" does these settings remember what team you came from when you go spec? Or are you talking about between spawns.nnEdit: I can't seem to get the mp_allowroaming cvar to return anything, as if it didnt exist.

Tank
posted here
Posts: 581
Threads: 59
Joined: Jan 2007
02-09-2009, 05:50 PM #10

Im sorry, I should've read the whole story. This would work between spawns I guess. The cvars are taken from the configs from CAL so I figured mp_allowroaming should still work as a cvar.

K Kristiansen
started this thread
Posts: 71
Threads: 18
Joined: Jan 2008
02-09-2009, 08:40 PM #11

Looks like it doesnt function anymore :/ Ive too seen it in cal configs and stuff.rnrn@ diamond-optic: Ive become comfortable with the plugins function and its kinda cool that it cycles through enemy team really fast before going back to own team. However, is there a possibility of getting spectator team to only be able to use e.g. locked chase cam?

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
02-09-2009, 09:41 PM #12

well originally i did it in the player prethink, which was much faster (and a lot less cpu effecient lol) then using the 10th of a second repeating task, but it seemed to cause problems becuase it would detect viewing someone you shouldnt like 20 times a second and would freak out a bit cause it couldnt switch the view fast enough after first detecting itnnbut whatever it is that only allows you to view youre own team while on a team and dead could probably be faked while on spec, but as to what that is, i dont know lolnnn*edit*nni also hoped that setting the pev_iuser2 value would better for changing the current spectated player but it doesnt really work that way and things get wierd when doing that :(nnas for that cvar, i really dont think that exists myself.. the cal configs are full of cvars and such that dont exist, at least not in dod

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
02-09-2009, 10:29 PM #13

oh yeah.. to fix that nonsense when using free look mode change:nn

if(g_specteam[id] != g_currteam[spec_id])
to this:nn
if(spec_id && g_specteam[id] != g_currteam[spec_id])
K Kristiansen
started this thread
Posts: 71
Threads: 18
Joined: Jan 2008
02-13-2009, 03:11 PM #14

Alrighty, I didnt get a chance to test this out before now. The free look cam thing was fixed but to the worse in regards of the plugins intention lol. (Its possible to use free look cam freely now) Is it possible to just allow 1 type of specator view? I.e. locked chase cam. :)

Archive › Old Forum Threads › General › Requests for DoD Plugins › Locking spec on original team players
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC