Raised This Month: $ Target: $400
 0% 

help making steamid restricted plugin.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ng1200
Member
Join Date: May 2005
Old 12-21-2005 , 09:40   help making steamid restricted plugin.
Reply With Quote #1

i tryed this:
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>

#define PLUGIN "Invisible Guy"
#define VERSION "1.0"
#define AUTHOR "CBM"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_concmd("amx_invisible","invisible",ADMIN_IMMUNITY,"- <name> <1/0>")
}
public invisible(id)
{
	new authid[32]
	get_user_authid(id,authid,31)
	if (authid != "STEAM_0:0:5968622")
	{
		client_print(id,print_chat,"[Invisible] No Access")
		return PLUGIN_HANDLED
	}
	new arg[32], arg2[32]
	read_argv(1,arg,31)
	read_argv(2,arg2,31)
	new target = cmd_target(id,arg,0)
	new onoff = str_to_num(arg2)
	if(onoff != 0 && onoff != 1)
	{
		client_print(id,print_console,"Usage: amx_invisible <name> <1/0>")
		return PLUGIN_HANDLED
	}
	if(!target)
	{
		client_print(id,print_console,"Usage: amx_invisible <name> <1/0>")
		return PLUGIN_HANDLED
	}
	switch(onoff)
	{
		case 1: set_entity_visibility(target,0)
		case 0: set_entity_visibility(target,1)

	}
	return PLUGIN_HANDLED
}
but complier gives error:
Code:
Error: Array must be indexed (variable "authid") on line 22
ng1200 is offline
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 12-21-2005 , 09:44  
Reply With Quote #2

Code:
if (authid[31] != "STEAM_0:0:5968622")
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 12-21-2005 , 10:02  
Reply With Quote #3

Code:
if (!equal(authid, "STEAM_0:0:5968622"))

You need to use the equal function to compare (C-Style) strings.
__________________
hello, i am pm
PM 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 16:10.


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