How to check is Player's Team Changed by an Admin?
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! :) |
Re: How to check is Player's Team Changed by an Admin?
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. |
Re: How to check is Player's Team Changed by an Admin?
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).
|
Re: How to check is Player's Team Changed by an Admin?
You can try with forwards.
https://forums.alliedmods.net/showthread.php?t=41241 |
Re: How to check is Player's Team Changed by an Admin?
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. |
Re: How to check is Player's Team Changed by an Admin?
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! |
| All times are GMT -4. The time now is 07:39. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.