Raised This Month: $ Target: $400
 0% 

message help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 03-03-2006 , 18:32   message help
Reply With Quote #1

ok i need some help with this... i wanted it to show as it was real chat and not like client_print but i messed it up... i guess i have to use the same event as adminlisten is using but i hopefully dont need that so thats why im asking you guys for help

Code:
#include <amxmodx> #include <amxmisc> psycholisten_mode() {     new mode[4]     get_cvar_string("pd_listen_mode", mode, 3)     return read_flags(mode) } public func(id) { // yes, this is catching say.     new mode = psycholisten_mode()     if (! mode) {         // completely disabled         return PLUGIN_CONTINUE     }         new is_alive = is_user_alive(id)     new team = get_user_team(id)         new command[17]     read_argv(0, command, 16)         new is_team_msg = ! equal(command, "say")         new player_count = get_playersnum()     new players[32]         get_players(players, player_count, "c")         new message2[129]     read_argv(1, message2, 128)         new name[33]     get_user_name(id, name, 32)                 // problem somewhere here     new channel[64]     if ( is_team_msg ) {         if ( team == 0 ) channel = "#Cstrike_Chat_Spec"         else if ( team == 1 ) channel = "#Cstrike_Chat_T"         else if ( team == 2 ) channel = "#Cstrike_Chat_CT"     }         else {         if ( is_user_alive(id) ) channel = "#Cstrike_Chat_All"         else channel = "#Cstrike_Chat_AllSpec"     }     // to here                 for (new i = 0; i < player_count; i++) {         if ( !is_user_bot(i) ) {             if ( ( mode & 2 ) && ! is_user_alive(players[i]) && is_alive && (! is_team_msg || team == get_user_team(players[i]) ) ) {                                                                 // problem somewhere here                 message_begin(MSG_ONE, get_user_msgid("SayText"),{0,0,0},players[i])                 write_byte(id)                 write_string(channel)                 write_string(name)                 write_string(message2)                 message_end()                 // to here                                                             }                         else if ( ( mode & 1 ) && ( get_user_flags(players[i] ) & ADMIN_LEVEL_B ) ) {                 if ( ( is_user_alive(players[i]) && ! is_alive ) || (is_team_msg && team != get_user_team(players[i]))) {                                                                                 // problem somewhere here                     message_begin(MSG_ONE, get_user_msgid("SayText"),{0,0,0},players[i])                     write_byte(id)                     write_string(channel)                     write_string(name)                     write_string(message2)                     message_end()                     // to here                                                                             }             }         }     }     return PLUGIN_CONTINUE } public plugin_init() {     register_plugin("..." , "...", "...")         register_clcmd("say", "handle_say")     register_clcmd("say_team", "handle_say")     register_cvar("pd_listen_mode", "ab") }
[ --<-@ ] Black Rose is offline
 



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 20:16.


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