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

How to check is Player's Team Changed by an Admin?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
W4J774CHU
Junior Member
Join Date: Feb 2019
Old 02-07-2019 , 15:08   How to check is Player's Team Changed by an Admin?
Reply With Quote #1

I'm creating plugin "Only Admin Spectator", and I created everything but I need to check is player's team changed by and admin ( so it wouldn't kick him out of spec team )...
We are using only amx_teammenu menu to change team but I want check inside my plugin!
W4J774CHU is offline
thEsp
BANNED
Join Date: Aug 2017
Old 02-07-2019 , 16:07   Re: How to check is Player's Team Changed by an Admin?
Reply With Quote #2

Simply use array list in order to check if someone's team was changed.
And the way you should do that is by using read_argv and cmd_target functions.
thEsp is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-07-2019 , 22:02   Re: How to check is Player's Team Changed by an Admin?
Reply With Quote #3

Since actions in the team menu aren't sent as a hookable command, you'd probably need to edit the amx_teammenu command (or override and recreate the entire command in your own plugin at which point you could store whether or not they were moved there by an admin).
__________________
fysiks is online now
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 02-08-2019 , 07:56   Re: How to check is Player's Team Changed by an Admin?
Reply With Quote #4

You can try with forwards.
https://forums.alliedmods.net/showthread.php?t=41241
__________________








CrazY. is offline
shauli
Member
Join Date: Jun 2018
Old 02-08-2019 , 08:04   Re: How to check is Player's Team Changed by an Admin?
Reply With Quote #5

Wait, what do you mean?
I don't think kicking spectators is the right way, you should block them from joining this team from the start.

There is a cvar for this such as allow_spectators, or even a plugin like this one:
https://forums.alliedmods.net/showthread.php?p=398087

Admins can of course bypass this with their commands.
shauli is offline
W4J774CHU
Junior Member
Join Date: Feb 2019
Old 02-08-2019 , 08:12   Re: How to check is Player's Team Changed by an Admin?
Reply With Quote #6

I'm not KICKING them I'm changing their team to CT/T!
And if example someone needs to do sth ex lunch they cannot be in spec unless admin allows it...
Edit: I did it, i modified plmenu and moved plmenu teammenu to my plugin!

Last edited by W4J774CHU; 02-08-2019 at 08:33.
W4J774CHU 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:44.


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