Raised This Month: $ Target: $400
 0% 

deluxe_admin_chat


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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 - 762 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
 


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 06:50.


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