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

[REQ] Change chat text *SPEC* to *DEAD*


Post New Thread Reply   
 
Thread Tools Display Modes
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 04-21-2012 , 21:45   Re: [REQ] Change chat text *SPEC* to *DEAD*
Reply With Quote #11

Quote:
Originally Posted by TRUE RED View Post
I can not move, man
What do you mean? I didn't change anything other than the chat messages.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
TRUE RED
Senior Member
Join Date: Mar 2012
Location: Ukraine
Old 04-21-2012 , 22:11   Re: [REQ] Change chat text *SPEC* to *DEAD*
Reply With Quote #12

Oh. sorry. Another plugin force me not to move. But anyway when i type say_team: it shows DEAD (Spectator).
TRUE RED is offline
Send a message via ICQ to TRUE RED Send a message via Skype™ to TRUE RED
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 04-21-2012 , 22:40   Re: [REQ] Change chat text *SPEC* to *DEAD*
Reply With Quote #13

Quote:
Originally Posted by TRUE RED View Post
Oh. sorry. Another plugin force me not to move. But anyway when i type say_team: it shows DEAD (Spectator).
Yes, if you're not alive and you're a spectator, and you use team chat, it will say you're dead and that you're talking to your teammates.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
TRUE RED
Senior Member
Join Date: Mar 2012
Location: Ukraine
Old 04-21-2012 , 22:59   Re: [REQ] Change chat text *SPEC* to *DEAD*
Reply With Quote #14

my bad you are right! thanks for help
TRUE RED is offline
Send a message via ICQ to TRUE RED Send a message via Skype™ to TRUE RED
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 04-21-2012 , 23:03   Re: [REQ] Change chat text *SPEC* to *DEAD*
Reply With Quote #15

Quote:
Originally Posted by TRUE RED View Post
my bad you are right! thanks for help
Not a problem.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
AnHiMiLaToR
Member
Join Date: Mar 2007
Old 04-22-2012 , 09:28   Re: [REQ] Change chat text *SPEC* to *DEAD*
Reply With Quote #16

Alright, the plugin didn't run on my server, so I managed to edit it to RUN and to match my requirements.

BUT it shows that message ONLY to me. Please help on how to fix this!
PHP Code:
public HandleSayTeam(id)
{
    new 
Speech[192];
    
read_args(Speech,191)
    
remove_quotes(Speech)
    
    new 
CsTeams:team cs_get_user_team(id)
    
    new 
szName[32];
    
get_user_nameidszNamecharsmax(szName) )
    
    if( 
team == CS_TEAM_SPECTATOR && !is_user_alive(id) )
    {
        
            new 
iPlayers[32], iNumi;
            
get_playersiPlayersiNum"b")
            
            for(
0<= iNumi++ )
            {
                new 
iPlayers[i];
                
                new 
CsTeams:team2 cs_get_user_team(x)
                
                if( 
team2 == CS_TEAM_SPECTATOR)
                {
                    new 
message[256] = "^x03";
                    
add(message255"(Spectator) ")
                    
add(message255szName)
                    
add(message255"^x01")
                    
add(message255" : ")
                    
add(message255Speech255-strlen(message)-1)

                    
message_begin(MSG_ONEget_user_msgid("SayText"), {0,0,0}, x);
                    
write_byte(x);
                    
write_string(message);
                    
message_end();
                    
                }
                return 
PLUGIN_HANDLED;
            }
    }
    
    return 
PLUGIN_CONTINUE;


Last edited by AnHiMiLaToR; 04-22-2012 at 12:44.
AnHiMiLaToR is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 04-22-2012 , 12:54   Re: [REQ] Change chat text *SPEC* to *DEAD*
Reply With Quote #17

I wrote out the code completely for you, and it worked fine. I don't see any reason for you to change it and make it more complicated than it has to be.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
AnHiMiLaToR
Member
Join Date: Mar 2007
Old 04-22-2012 , 12:59   Re: [REQ] Change chat text *SPEC* to *DEAD*
Reply With Quote #18

Well, I thanked you a lot for the code, but it gave me some errors (that I don't have the library chatcolor, but it was there) so I hadn't what more to do except to edit the code. What solution do you offer now? :/
AnHiMiLaToR is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 04-22-2012 , 13:09   Re: [REQ] Change chat text *SPEC* to *DEAD*
Reply With Quote #19

Quote:
Originally Posted by AnHiMiLaToR View Post
Well, I thanked you a lot for the code, but it gave me some errors (that I don't have the library chatcolor, but it was there) so I hadn't what more to do except to edit the code. What solution do you offer now? :/
Hit "Get Plugin" in my other post, and then go here:
http://forums.alliedmods.net/showthread.php?t=94960

Hit "Get Plugin" at the bottom of his post, and put both the plugins into your server.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
AnHiMiLaToR
Member
Join Date: Mar 2007
Old 04-22-2012 , 18:23   Re: [REQ] Change chat text *SPEC* to *DEAD*
Reply With Quote #20

Alright, here's the final solution, it works thanks to you!
Attached Files
File Type: sma Get Plugin or Get Source (spectodead.sma - 235 views - 1.2 KB)
AnHiMiLaToR 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 10:53.


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