Raised This Month: $ Target: $400
 0% 

Reserve Slot Talk


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
semaja2
Member
Join Date: Aug 2005
Location: Adelaide
Old 09-11-2006 , 02:44   Reserve Slot Talk
Reply With Quote #1

Hey guys would someone be able to whip up a plugin that allows a user with reserve slot access to do a command like:

say_team !testmsg

Then it sends that message to everyone with flag b

Its the same as the admin one but expanded to everyone with flag b

It would also be cool if it was in a different colour so admins dont get the two talking mixed up.



Any Help is appericated
semaja2 is offline
Send a message via MSN to semaja2
slurpycof
Senior Member
Join Date: Nov 2004
Old 09-11-2006 , 12:41   Re: Reserve Slot Talk
Reply With Quote #2

You can add these lines to your base adminchat.sma and recompile to do this.

add to the public plugin_init() section
Code:
register_concmd("amx_chat2", "cmdChat2", ADMIN_RESERVATION , "<message> - sends message to reserved slots")
add this at the bottom

Code:
public cmdChat2(id, level, cid)
{
	if (!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED

	new message[192], name[32], players[32], inum, authid[32], userid
	
	read_args(message, 191)
	remove_quotes(message)
	get_user_authid(id, authid, 31)
	get_user_name(id, name, 31)
	userid = get_user_userid(id)
	get_players(players, inum)
	
	log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"", name, userid, authid, message)
	log_message("^"%s<%d><%s><>^" triggered ^"amx_chat2^" (text ^"%s^")", name, userid, authid, message)
	
	format(message, 191, "(reserved) %s :   %s", name, message)
	console_print(id, "%s", message)
	
	for (new i = 0; i < inum; ++i)
	{
		if (access(players[i], ADMIN_RESERVATION))
			client_print(players[i], print_chat, "%s", message)
	}
	
	return PLUGIN_HANDLED
}
slurpycof is offline
semaja2
Member
Join Date: Aug 2005
Location: Adelaide
Old 09-12-2006 , 08:35   Re: Reserve Slot Talk
Reply With Quote #3

So will this do say_team because i think it does amx_say2 instead
semaja2 is offline
Send a message via MSN to semaja2
slurpycof
Senior Member
Join Date: Nov 2004
Old 09-13-2006 , 14:05   Re: Reserve Slot Talk
Reply With Quote #4

change the amx_chat2 to whatever you want the command to be.
slurpycof 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 10:20.


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