Raised This Month: $51 Target: $400
 12% 

Admin private chat: Flash player screen


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
spiderbites
Senior Member
Join Date: Nov 2007
Old 05-21-2008 , 05:15   Admin private chat: Flash player screen
Reply With Quote #1

How do i change this codes so when admin sends a private message (amx_psay) to a player, his screen will flash in white briefly when he receives that message..

Code:
public cmdPsay(id, level, cid)
{
	if (!cmd_access(id, level, cid, 3))
		return PLUGIN_HANDLED
	
	new name[32]
	read_argv(1, name, 31)
	new priv = cmd_target(id, name, 0)

	if (!priv)
		return PLUGIN_HANDLED
	
	new length = strlen(name) + 1

	get_user_name(priv, name, 31); 
	
	new message[192], name2[32], authid[32], authid2[32], userid, userid2
	
	get_user_authid(id, authid, 31)
	get_user_name(id, name2, 31)
	userid = get_user_userid(id)
	read_args(message, 191)
	
	if (message[0] == '"' && message[length] == '"') // HLSW fix
	{
		message[0] = ' '
		message[length] = ' '
		length += 2
	}
	
	remove_quotes(message[length])
	get_user_name(priv, name, 31)
	
	if (id && id != priv)
		client_print(id, print_chat, "(%s) %s :   %s", name, name2, message[length])
	
	client_print(priv, print_chat, "(%s) %s :   %s", name, name2, message[length])
	console_print(id, "(%s) %s :   %s", name, name2, message[length])
	get_user_authid(priv, authid2, 31)
	userid2 = get_user_userid(priv)
	
	log_amx("Chat: ^"%s<%d><%s><>^" psay ^"%s<%d><%s><>^" ^"%s^"", name2, userid, authid, name, userid2, authid2, message[length])
	log_message("^"%s<%d><%s><>^" triggered ^"amx_psay^" against ^"%s<%d><%s><>^" (text ^"%s^")", name2, userid, authid, name, userid2, authid2, message[length])
	
	return PLUGIN_HANDLED
}
__________________
Leave your name when you give +/- karma for me.

Last edited by spiderbites; 05-21-2008 at 05:19.
spiderbites is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-21-2008 , 05:52   Re: Admin private chat: Flash player screen
Reply With Quote #2

Add this before the logging parts:
PHP Code:
    message_begin(MSG_ONE_UNRELIABLEget_user_msgid("ScreenFade"), {0,0,0}, priv);
    
write_short((1<<10)); // duration
    
write_short((1<<10)); // hold time
    
write_short((1<<12)); // fade type
    
write_byte(255); // red
    
write_byte(255); // green
    
write_byte(255); // blue
    
write_byte(200); // alpha
    
message_end(); 
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Rosenstein
Senior Member
Join Date: Feb 2008
Location: Serbia
Old 05-21-2008 , 07:47   Re: Admin private chat: Flash player screen
Reply With Quote #3

This could be added in Amx Super too.
__________________
+1
Rosenstein 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 21:10.


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