Raised This Month: $ Target: $400
 0% 

what's wrong with the plugin ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
revo4cs
Junior Member
Join Date: Jan 2013
Old 01-19-2013 , 14:24   what's wrong with the plugin ?
Reply With Quote #1

I just modified the [Admin check plugin] but the plugin have a bug when i just use the slash.amxx plugin, the check admin plugin did not show me the result of the plugin, but when i recompile i got errors.

Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

/*---------------EDIT ME------------------*/
#define ADMIN_CHECK ADMIN_KICK

static const COLOR[] = "^x04" //green
static const CONTACT[] = "^x04"
/*----------------------------------------*/

new maxplayers
new gmsgSayText
new pcvar_Display


public plugin_init() {
	register_plugin("Admin Online", "0.1a", "R3VO")
	maxplayers = get_maxplayers()
	gmsgSayText = get_user_msgid("SayText")
	register_concmd("say /whoadmin", "handle_say")
	register_concmd("say /admin", "handle_say")
	register_concmd("say /admins", "handle_say")
	register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
        pcvar_Display = register_cvar("sv_aodisplay", "0")
}

public handle_say(id)
 {
	if(get_pcvar_num(pcvar_Display) == 1)
	{
		client_print(0, print_adminlist,)
	}
	else
	{
		client_print(id, print_adminlist)
	}
        return PLUGIN_HANDLED
}

public print_adminlist(user) 
{
	new adminnames[33][32]
	new message[256]
	new contactinfo[256], contact[112]
	new id, count, x, len
	
	for(id = 1 ; id <= maxplayers ; id++)
		if(is_user_connected(id))
			if(get_user_flags(id) & ADMIN_CHECK)
				get_user_name(id, adminnames[count++], 31)

	len = format(message, 255, "%s ADMINS ONLINE: ",COLOR)
	if(count > 0) {
		for(x = 0 ; x < count ; x++) {
			len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
			if(len > 96 ) {
				print_message(user, message)
				len = format(message, 255, "%s ",COLOR)
			}
		}
		print_message(user, message)
	}
	else {
		len += format(message[len], 255-len, "No admins online.")
		print_message(user, message)
	}
	
	get_cvar_string("amx_contactinfo", contact, 63)
	if(contact[0])  {
		format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)
		print_message(user, contactinfo)
	}
}

print_message(id, msg[]) {
	message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}
Errors:

Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// admin_on.sma
// C:\Program Files (x86)\Steam\steamapps\revoportal1\dedicated server\cstrike\addons\amxmodx\scripting\admin_on.sma(33) : error 029: invalid expression, assumed zero
// C:\Program Files (x86)\Steam\steamapps\revoportal1\dedicated server\cstrike\addons\amxmodx\scripting\admin_on.sma(37) : error 029: invalid expression, assumed zero
// 
// 2 Errors.
// Could not locate output file C:\Program Files (x86)\Steam\steamapps\revoportal1\dedicated server\cstrike\addons\amxmodx\scripting\compiled\admin_on.amx (compile failed).
//
// Compilation Time: 0.08 sec
// ----------------------------------------

// File not found.

:crab
revo4cs is offline
 


Thread Tools
Display Modes

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 13:32.


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