Raised This Month: $ Target: $400
 0% 

Access Plugin by steam ID


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
InsanityKARAI
Member
Join Date: Jul 2014
Old 10-05-2014 , 14:05   Access Plugin by steam ID
#1

hello, I would like to know how I do I can put a Steam ID to access a certain command to a plugin?

example:

#define ACCESS STEAM: 0: 0123456789

register_clcmd ("say / noclip", "noclip");

public noclip (id)
{
ACCESS
noclip
}

and that anyone who does not have this SteamID tera access to the command?

What do I must add the plugin?
InsanityKARAI is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-05-2014 , 14:07   Re: Access Plugin by steam ID
#2

This seems to be a backdoor. You won't get help here with that.
__________________
HamletEagle is offline
InsanityKARAI
Member
Join Date: Jul 2014
Old 10-05-2014 , 14:49   Re: Access Plugin by steam ID
#3

what it is backdoor?
InsanityKARAI is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 10-05-2014 , 15:31   Re: Access Plugin by steam ID
#4

its bad idea to hardcode things like steam id
Code:
#include <amxmodx> #include <fun> public plugin_init() {    register_clcmd("say /noclip", "noclip") } public noclip(id) {    if (get_user_flags(id) & ADMIN_LEVEL_C)    {       set_user_noclip(id, !get_user_noclip(id))    } }

use this and add access to flag "o" for the steamid. or you can change the ADMIN_LEVEL_C to whatever flag you would want to use

Code:
#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" */

Last edited by jimaway; 10-05-2014 at 15:31.
jimaway is offline
InsanityKARAI
Member
Join Date: Jul 2014
Old 10-05-2014 , 15:42   Re: Access Plugin by steam ID
#5

but how can I put a steam ID to have access to this command
? I did not what you talked
InsanityKARAI is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 10-05-2014 , 16:00   Re: Access Plugin by steam ID
#6

Quote:
Originally Posted by InsanityKARAI View Post
but how can I put a steam ID to have access to this command
? I did not what you talked
That is still defined as a backdoor.
__________________
WildCard65 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-05-2014 , 17:26   Re: Access Plugin by steam ID
#7

What jimaway stated is the appropriate method and you will not be suggested otherwise.
__________________

Last edited by fysiks; 10-05-2014 at 17:27.
fysiks is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-05-2014 , 17:35   Re: Access Plugin by steam ID
#8

We do not support backdoors
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Closed Thread



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 17:31.


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