View Full Version : Me spec / secret spectate
blobby
09-09-2007, 09:14 AM
This is a simple plugin that you can type /mespec in chat or mespec in console and you will go into spectate but you seem to stay on your team to the rest of the players on your server
Make sure you define your admin level where you see this line on the sma file
// Define your admin level it is required below ADMIN_LEVEL_H is a custom level//
#define INVISIBILE_ADMIN ADMIN_LEVEL_H
Do not change the INVISIBILE_ADMIN part on the ADMIN_LEVEL_H
The commands for this plugin are as follows:-
/mespec
This command is used in client chat or team chat to put you in secret spec
mespec
This is the console command that is used to put you in secret spec you can also bind this key as follows:-
bind key mespec
dod_quickspec 1/0
This is the cvar to turn the plugin on and off 1 = on 0 = off
I must thank feuersturm for all of his help during the making of this plugin and for getting the cvar to work for me and blocking the team message as you join back on to your team
If you have any questions just ask
Enjoy my plugin and regards
Blobby
Garion
09-12-2007, 12:49 AM
do you still show as on a team when someone joins the server? Reason I ask is if someone that knows you happens to join and asks why your on spec, wouldn't that give it away?
blobby
09-12-2007, 08:09 AM
No you still show as on your team even to people who connect to the server while you are using this you just show as dead :p
also i just need to add if you use the weaponmod where you type /weaponname you need to put the line mesepc.amxx above the weaponmod.amxx line because for some reason the weaponmod blocks the /mespec commands for this plugin
If you ahve any more questions just ask
Regards
Blobby
blobby
09-21-2007, 11:54 AM
Wooops ive spotted a bug on this if you are just about to respawn and you go to mespec you spawn in the dead center of any map with 1 nade ive been looking over the code just now after it happened to see if i could see any thing but i couldn't
i just did think tho could it be to do with this
dod_set_user_team(id, 3, 0)
If any of you amazing coders can see any thing please let me know so i can fix this
Regards
Blobby
FeuerSturm
09-21-2007, 12:50 PM
you could add a check if the player is alive when he uses the command
and deny it if he isn't, that should solve the problem.
blobby
09-21-2007, 01:28 PM
Riteo cheers Feuersturm im away from home atm but when i get back 2moz i will do that and post the update :p
blobby
10-13-2007, 02:54 PM
Woot 13 views
Hood [10th MD]
10-18-2007, 08:50 PM
looks good, i'll definitely give it a shot if i start running a server again.
deathbringer1972
11-07-2007, 08:41 PM
Props to you sir...:)
jondoe
11-08-2007, 05:52 PM
Your the man Blobby, Very nice work ;)
blobby
11-09-2007, 09:10 AM
Cheers jondoe
Akula
11-23-2007, 04:21 PM
Started using this plugin recently , and i must say its absolutely fantastic.
A definate MUST HAVE for server admins.
blobby
11-24-2007, 09:16 AM
Im glad your happy with it mate if you can think of any improvements that could be made post them here for me
Regards
Blobby
blobby
12-02-2007, 11:41 PM
Little update so i can find out how many people are using this plugin so please if you sue this update to is
Regards
blobby
WARDOG
12-04-2007, 06:21 PM
Evidently there is a bug with this where if you go mespec after you died while playing, you can end up in the opposite teams spawn. One of my members has the details, check your code, he said it was an easy fix.
I was just told about it so I will try to give you more info as soon as I know. Again this is a bug, not an error. Other than this, it is a very usefull plugin, thanks Blobby.
blobby
12-05-2007, 06:00 AM
Hey wardog yeah please do let me know about this also have you updayed to my new trackable version ??
Regards
Blobby
Equinox
12-26-2007, 02:36 AM
Im having some trouble "defining my admin level". When it says admin level H does this mean I can add the custom level "h" to the users i wish to use this in users.ini? Any help would be appreciated, thanks alot in advance guys
Equinox<^|SiNz|^>
Ba5ic
12-26-2007, 06:31 AM
Just installed, works a treat. Nice job Blobby! :P
+Karma :P
blobby
12-26-2007, 10:57 AM
Im having some trouble "defining my admin level". When it says admin level H does this mean I can add the custom level "h" to the users i wish to use this in users.ini? Any help would be appreciated, thanks alot in advance guys
Equinox<^|SiNz|^>
Yeah that means if you give the flag t to any of your members they will get the use of this plugin
diamond-optic
12-27-2007, 04:50 AM
When it says admin level H does this mean I can add the custom level "h" to the users i wish to use this in users.ini?
ADMIN_LEVEL_H is not equal to the "h" admin flag...
heres what the constants are and what they equal:
#define ADMIN_ALL 0 /* everyone */
#define ADMIN_IMMUNITY (1<<0) /* flag "a" */
#define ADMIN_RESERVATION (1<<1) /* flag "b" */
#define ADMIN_KICK (1<<2) /* flag "c" */
#define ADMIN_BAN (1<<3) /* flag "d" */
#define ADMIN_SLAY (1<<4) /* flag "e" */
#define ADMIN_MAP (1<<5) /* flag "f" */
#define ADMIN_CVAR (1<<6) /* flag "g" */
#define ADMIN_CFG (1<<7) /* flag "h" */
#define ADMIN_CHAT (1<<8) /* flag "i" */
#define ADMIN_VOTE (1<<9) /* flag "j" */
#define ADMIN_PASSWORD (1<<10) /* flag "k" */
#define ADMIN_RCON (1<<11) /* flag "l" */
#define ADMIN_LEVEL_A (1<<12) /* flag "m" */
#define ADMIN_LEVEL_B (1<<13) /* flag "n" */
#define ADMIN_LEVEL_C (1<<14) /* flag "o" */
#define ADMIN_LEVEL_D (1<<15) /* flag "p" */
#define ADMIN_LEVEL_E (1<<16) /* flag "q" */
#define ADMIN_LEVEL_F (1<<17) /* flag "r" */
#define ADMIN_LEVEL_G (1<<18) /* flag "s" */
#define ADMIN_LEVEL_H (1<<19) /* flag "t" */
#define ADMIN_MENU (1<<20) /* flag "u" */
#define ADMIN_ADMIN (1<<24) /* flag "y" */
#define ADMIN_USER (1<<25) /* flag "z" */
Equinox
12-29-2007, 03:15 PM
So, I gave one member full admin to the server (same level as mine) and had him test the mespec plugin. He was unable to use it. He had access flags a-u and after typing "mespec" into his console, was told that he did not have access to that command. I checked to make sure I set his access flags correctly, and I did. Is there any help or advice for this?
Thanks guys,
Ox
p.s. new version of vBulletin looks nice!
blobby
12-30-2007, 02:12 PM
Yeah he needs the admin flag t to make mespec work or you can change the flag needed to use this in the plugins source code
Regards
Blobby
{DwP} 325th ABN
12-30-2007, 11:54 PM
nice job blooby i like it works good for me
blobby
12-31-2007, 01:01 AM
Thanks m8 glad u like it
WARDOG
02-09-2008, 05:35 AM
Ok Blobby, sorry I have not replied here sooner. the bug with your plugin is, if you type mespec in consol after you die while playing, and submit the command right before you spawn, you can spawn in the opposite teams spawn as one of them, and get killed by them counting as a team kill.
Hood [10th MD]
03-11-2008, 08:06 PM
If you're still having problems with death, check if the user is alive before specing them - either put this in with the cvar check, or be sneaky and put it before the team switch, and just have an event that catches spawn, and if you're supposed to be specing, it'll switch you automatically.
That's a little more complicated than the 2 minutes I'm taking to post this - but the fix would simply be to find the line
if(get_pcvar_num(p_me_spec)==1)
and replace it with
if(get_pcvar_num(p_me_spec)==1&&is_user_alive(id)==1)
and if you'd like to inform people why they don't get switched when they're dead, add ||is_user_alive(id)==0 to the end of the else if statement following the above block.
to catch spawn, you'd need to register the event, and then create a function to put them in spec if inSecretSpec[id]==1
Hope that helps. I'm putting the plugin on tonight, if I have any problems, I'll let you know.
blobby
03-30-2008, 05:26 PM
ill get round to fixing this in the next few days and will repost it up thanks for spotting that :P
Hood [10th MD]
03-31-2008, 06:19 PM
Ah, forgot feedback - works well, I don't particularly need it and I modified it a bit beyond what I actually should've, but it worked great! Excellent plugin for admins!
gunsofnavarone
11-29-2008, 11:24 AM
OK, I must be a nitwit or something. What exactly does "Make sure you define your admin level where you see this line on the sma file" mean?
1) Define how? or To what? Am I modifying the sma file to reflect something else?
2) Or is my "definition" supposed to be elsewhere?
My user.ini file reads this:
; Users configuration file
; File location: $moddir/addons/amxmodx/configs/users.ini
; Line starting with ; is a comment
; Access flags:
; a - immunity (can't be kicked/baned/slayed/slapped and affected by other commmands)
; b - reservation (can join on reserved slots)
; c - amx_kick command
; d - amx_ban and amx_unban commands
; e - amx_slay and amx_slap commands
; f - amx_map command
; g - amx_cvar command (not all cvars will be available)
; h - amx_cfg command
; i - amx_chat and other chat commands
; j - amx_vote and other vote commands
; k - access to sv_password cvar (by amx_cvar command)
; l - access to amx_rcon command and rcon_password cvar (by amx_cvar command)
; m - custom level A (for additional plugins)
; n - custom level B
; o - custom level C
; p - custom level D
; q - custom level E
; r - custom level F
; s - custom level G
; t - custom level H
; u - menu access
; z - user (no admin)
; Account flags:
; a - disconnect player on invalid password
; b - clan tag
; c - this is steamid/wonid
; d - this is ip
; e - password is not checked (only name/ip/steamid needed)
; Password:
; Add to your autoexec.cfg: setinfo _pw "<password>"
; Change _pw to the value of amx_password_field
; Format of admin account:
; <name|ip|steamid> <password> <access flags> <account flags>
; Examples of admin accounts:
; "STEAM_0:0:123456" "" "abcdefghijklmnopqrstu" "ce"
; "123.45.67.89" "" "abcdefghijklmnopqrstu" "de"
; "My Name" "my_password" "abcdefghijklmnopqrstu" "a"
"STEAM_0:1:17790757" "" "abcdefghijklmnopqrstu" "ce"
; "loopback" "" "abcdefghijklmnopqrstu" "de"
When I use the command via bind (bind "F4" "say /mespec"), it shows:
"You have no access to that command"
When I type in console amx_who it shows:
GunsOfNavarone STEAM_0:1:17790757 10 Yes Yes abcdefghijklmnopqrsu
Is this plugin blocking my "t" access, because it doesn't show as indicated above (...pqrsu)?!?
Look inside the sma (source) file. Read line 22 and 23 might help ya..
At the moment it is set for flag t.
What you do is download the sma file. Open it with any text editor (wordpad or notepad is ok). Now you look for this line:
// Define your admin level it is required below ADMIN_LEVEL_H is a custom level//
#define INVISIBILE_ADMIN ADMIN_LEVEL_H
Remember admin_level_h is not flag H. This (http://wiki.amxmodx.org/Adding_Admins_(AMX_Mod_X)#Access_Levels) website contains a list with admin flags and admin levels. admin_level_h IS flag T. That is why it doesn't work for you. You could for example change it to
// Define your admin level it is required below ADMIN_LEVEL_H is a custom level//
#define INVISIBILE_ADMIN ADMIN_LEVEL_G
Above stated will change it to flag S and will make it work for you. Good luck and if you need anything, just holla at us :D
gunsofnavarone
11-30-2008, 09:39 AM
Thank you so very much for the direct response. I guess my "real" problem is elsewhere.
As I indicated "t" is clearly defined within the user.ini file. So, somewhere along the line, the server is blocking it or simply not recognizing it as was indicated by the response from the amx_who command.
If I read your response correctly, since "t" was defined in my user.ini file, then I shouldn't have to modify the existing code at all.
Thank you again for your reply. Now I've got to figure out what's causing the "t" flag to not be recognized.
I'm sorry, I clearly didn't read your post properly. I'll load this plugin on my test server and see if I have the same issue.
gunsofnavarone
11-30-2008, 12:07 PM
I have found my problem (sort of) and a work around.
First, it's not the plugin. With the plugin remarked out, and the server restarted, when I enter amx_who it STILL does not show the "t" flag. This tells me it's something serverside that's interfering/ignoring the settings defined in the user.ini file.
My work around was to modify the cmdaccess.ini file. The last entry in it was for mespec which indicated the "t" flag. I simply (and arbitrarily) changed the flag to "g". It now works for me.
So, I have some serverside issues I need to contend to as I am finding out. So I've put in a support ticket.
Thank you for your help nonetheless.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.