Raised This Month: $ Target: $400
 0% 

[request] chat plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JKB
Member
Join Date: Jan 2006
Old 03-04-2006 , 17:53   [request] chat plugin
Reply With Quote #1

I'd like to have a plugin, where dead players can see what alive players say,
and alive players can see what dead players see... one big chatbox
and yes, ive done searching
__________________
Quote:
Chuck Norris doesn't sleep. He waits.
JKB is offline
wouter
Senior Member
Join Date: Feb 2005
Location: Belgium
Old 03-04-2006 , 17:58  
Reply With Quote #2

not good enoug
http://forums.alliedmods.net/showthread.php?p=107768
but i think you shouldnt use it, because there are some bugs in it,
it made ly server crash sometimes.

so yea maybe good recuest
wouter is offline
Des12
Senior Member
Join Date: Jan 2005
Old 03-04-2006 , 18:03  
Reply With Quote #3

Looks as if that is only for admins, so I will go head and make you one.
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
Des12
Senior Member
Join Date: Jan 2005
Old 03-04-2006 , 19:07  
Reply With Quote #4

Here, see if this works (Post any problems you have here!):

Plugin makes dead or alive players see each other's regular say (not team say!)

Note: Will only work if allchat_on is set to 1
Attached Files
File Type: sma Get Plugin or Get Source (allchat.sma - 673 views - 475 Bytes)
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 03-04-2006 , 20:47  
Reply With Quote #5

this would print it out as normal chat messages
also catch team msgs and show them to opposite team
Code:
// This basicly is a small modification of PsychoListen mixed with AdminListen #include <amxmodx> public plugin_init() {     register_plugin("Listen Up!" , "0.0", "Psychoguard+Maxim")         register_cvar("allchat_on", "1")         register_clcmd("say", "handle_say")     register_clcmd("say_team", "handle_say") } public hook_say(id) {     if( !get_cvar_num("allchat_on") ) {                 new is_alive = is_user_alive(id)         new team = get_user_team(id)                 new channel[64]                 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 message[129]         read_argv(1, message, 128)                 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 ( team == 3 ) channel = "#Cstrike_Chat_Spec"             }         else {             if ( is_user_alive(id) ) channel = "#Cstrike_Chat_All"             else channel = "#Cstrike_Chat_AllSpec"         }                 for (new i = 0; i < player_count; i++) {             if ( ( ! is_user_alive(players[i]) && is_alive && (! is_team_msg || team == get_user_team(players[i]) ) ) || ( is_user_alive(players[i]) && ! is_alive ) || ( is_team_msg && team != get_user_team(players[i]) ) ) {                 message_begin(MSG_ONE, get_user_msgid("SayText"),{0,0,0},players[i])                 write_byte(id)                 write_string(channel)                 write_string("")                 write_string(message)                 message_end()             }         }     } }
[ --<-@ ] Black Rose is offline
JKB
Member
Join Date: Jan 2006
Old 03-05-2006 , 07:16  
Reply With Quote #6

@wouter
i've already found that one, but that's not what i was looking for

@Des12
im testing it right now

@[ --<-@ ] Black Rose
i forget to mention, it excludes team chat

//edit
i tested tehe one from des12, and it's working, but when you're dead, your name is not displayed in colour

im testing the one from black rose now

//edit2
it works and it's very, very nice
but one more thing,
when alive, the team messages should be for alive/dead team players only; or alive teamplayers only, if that's the easiest way to code it
when dead, team messages go to everyone
__________________
Quote:
Chuck Norris doesn't sleep. He waits.
JKB 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 13:21.


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