Raised This Month: $ Target: $400
 0% 

deluxe_admin_chat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Z@C
Member
Join Date: May 2006
Location: Moscow, Russia
Old 12-09-2006 , 21:19   deluxe_admin_chat
Reply With Quote #1

hi
i have a trouble with show private message,example:
show only this >> (player1) player2 :
but must example this (player1) player2 : hi

PHP Code:
public adm_psay(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
    
new message[255], name2[32],authid[16],authid2[16], useriduserid2
    get_user_authid
(id,authid,15)
    
get_user_name(id,name2,31)
    
userid get_user_userid(id)
    
read_argv(2,message,254)
    if (
message[0]=='"' && message[length]=='"') { // HLSW fix
        
message[0]=message[length]=' '
        
length+=2
    
}
    
remove_quotes(message[length])
    
get_user_name(priv,name,31)
    
format(message_to_send,254,"^x03(%s) %s ^x01:  %s",name,name2,message[length])
    if (
id&&id!=priv) {
        
message_begin(MSG_ONEgmsgSayText_id)
        
write_byte(id)
        
write_string(message_to_send)
        
message_end()
    }
    
message_begin(MSG_ONEgmsgSayText_priv)
    
write_byte(priv)
    
write_string(message_to_send)
    
message_end()
    
get_user_authid(priv,authid2,15)
    
userid2 get_user_userid(priv)
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_psay^" against ^"%s<%d><%s><>^" (text ^"%s^")",name2,userid,authid,name,userid2,authid2,message[length])
    
log_to_file("addons/amxmodx/logs/message/say.log","^"%s<%d><%s><>^" against ^"%s<%d><%s><>^" (text ^"%s^")",name2,userid,authid,name,userid2,authid2,message[length])
    return 
PLUGIN_HANDLED

and don't apply private color message (write in file: ok. read from file: failed)
HELP me PLZ
Attached Files
File Type: sma Get Plugin or Get Source (admin_chat_deluxe.sma - 763 views - 24.0 KB)
__________________
HLDS protocol 48 (CS 1.1.2.6 build 4883 on FreeBSD 9.0)
AMXX v1.8.1.3746 | METAMOD v1.19p32 | DProto 0.9.87
Web: Nginx 1.0.10 (build 1.1), Apache 2.2.21, PHP 5.3.8, MySQL 5.5.17

Last edited by Z@C; 12-10-2006 at 05:19.
Z@C is offline
Send a message via ICQ to Z@C
Old 12-10-2006, 08:24
[ --<-@ ] Black Rose
This message has been deleted by [ --<-@ ] Black Rose.
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 12-10-2006 , 08:41   Re: deluxe_admin_chat
Reply With Quote #2

Try
Code:
read_args(message, 255)
There is no 2nd arg. 0 = say/say_team, 1 = text.
[ --<-@ ] Black Rose is offline
Don't Even Try
Junior Member
Join Date: Aug 2006
Old 12-10-2006 , 09:47   Re: deluxe_admin_chat
Reply With Quote #3

Maybe this works it needs modification but its about the code not numbers.

Code:
new csnd_saidtext[32]
 read_argv(1, csnd_saidtext, 31)
__________________
(If Death Doesn't Come Early It Will Come Soon Enough)
Don't Even Try is offline
Z@C
Member
Join Date: May 2006
Location: Moscow, Russia
Old 12-11-2006 , 03:36   Re: deluxe_admin_chat
Reply With Quote #4

Quote:
Originally Posted by [ --<-@ ] Black Rose View Post
Try
Code:
read_args(message, 255)
There is no 2nd arg. 0 = say/say_team, 1 = text.
hmm... i try this method early,but don't work ... now it's ok THX
mb you know anything about 2nd trouble?
__________________
HLDS protocol 48 (CS 1.1.2.6 build 4883 on FreeBSD 9.0)
AMXX v1.8.1.3746 | METAMOD v1.19p32 | DProto 0.9.87
Web: Nginx 1.0.10 (build 1.1), Apache 2.2.21, PHP 5.3.8, MySQL 5.5.17
Z@C is offline
Send a message via ICQ to Z@C
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 06:50.


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