Raised This Month: $51 Target: $400
 12% 

kick Spectators when there is HLTV


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vamppa
Senior Member
Join Date: Apr 2010
Location: The Netherlands
Old 05-25-2012 , 08:28   kick Spectators when there is HLTV
Reply With Quote #1

Helloo

could someone create a plugin that if there is a HLTV present in the server kicks out spectators unless you got ADMIN flag ?
For the kicked out player shows up a message showing the hltv's IP:port for them to connect.

or better yet just redirect spectators to the HLTV when there is a hltv present in the game server if that would be possible ^^

Last edited by vamppa; 05-25-2012 at 08:46.
vamppa is offline
nelsonsimpsonz
Member
Join Date: Feb 2012
Old 05-25-2012 , 09:30   Re: kick Spectators when there is HLTV
Reply With Quote #2

this is a cvar: sv_proxies 0
nelsonsimpsonz is offline
vamppa
Senior Member
Join Date: Apr 2010
Location: The Netherlands
Old 05-25-2012 , 10:53   Re: kick Spectators when there is HLTV
Reply With Quote #3

nope, sv_proxies is for allowing the number of hltv's on your game server - 0 being hltv disabled.
with spectators I mean "players that are in the gameserver spectating/observing"

it would be handy for clanmatches and server performance if all the spectating players are transferred to the hltv when there is one. (excluding admins)
when there is no hltv, spectating players stay, nothing happens.
up till now we kick players manually with admin power.
a plugin like this would not require an admin to be there, would be major help.
vamppa is offline
vamppa
Senior Member
Join Date: Apr 2010
Location: The Netherlands
Old 05-25-2012 , 15:37   Re: kick Spectators when there is HLTV
Reply With Quote #4

code for checking if a player is spectating
PHP Code:
#include <fakemeta> 

#define IsObserver(%0) pev(%0,pev_iuser1) 

if (IsObserver(id)) 
how would I automatically check if a hltv is present within the server? with status?
vamppa is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-25-2012 , 16:07   Re: kick Spectators when there is HLTV
Reply With Quote #5

Code:
stock GetPlayers(players[32] = {0,...}, &pnum = 0, const flags[] = "", const teamORname[] = "") {     get_players(players, pnum, flags, teamORname);     return pnum; }

To check if there are HLTVs:
Code:
if(GetPlayers(.flags = "h")) {     // HLTV exists } else {     // There is no HLTV }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:12.


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