Raised This Month: $ Target: $400
 0% 

How to replace some words in Status text?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hzqst
Senior Member
Join Date: Jul 2008
Old 12-28-2008 , 09:53   How to replace some words in Status text?
Reply With Quote #1

register_message(get_user_msgid("StatusValue" ), "message_Status")
register_message(get_user_msgid("StatusText") , "message_Status")
I can only block these messages
---When someone see another player:
Enemy: XXX Health:100%
change to :
Friend:my string Health:my int %
and custom color
hzqst is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-28-2008 , 14:33   Re: How to replace some words in Status text?
Reply With Quote #2

If you make a StatusText message, it will be yellow.
You cannot change the color.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-28-2008 , 14:49   Re: How to replace some words in Status text?
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post
You can change the color.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-28-2008 , 14:59   Re: How to replace some words in Status text?
Reply With Quote #4

LIES!
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 12-28-2008 , 16:20   Re: How to replace some words in Status text?
Reply With Quote #5

See how I do in my Kz Mod I change the color with new msg.
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 12-28-2008 , 17:07   Re: How to replace some words in Status text?
Reply With Quote #6

I use this,

PHP Code:
new Msg_StatusTextMsg_StatusValue;

// [...]

Msg_StatusText get_user_msgid("StatusText")
Msg_StatusValue get_user_msgid("StatusValue")

// [...]

// Write a text on the bottom left of the screen
// See statusbar.cpp (hlsdk) for more info about this Messages
// Make_StatusText(id_to_show_msg, target_to_get_name, msg)
// target_to_get_name -> %%p2, name of this index
stock Make_StatusText(idtarget, const message[64])
{
    if (!
is_user_connected(id) || !is_user_connected(target))
        return

    
message_begin(MSG_ONE_UNRELIABLEMsg_StatusText_id)
    
write_byte(0)
    
write_string(message)
    
message_end()
    
    
message_begin(MSG_ONE_UNRELIABLEMsg_StatusValue_id); 
    
write_byte(2); 
    
write_short(target); 
    
message_end();  

If you want to get the player name, you can make something like this:

PHP Code:

// Idk if %i2 get the target health..
Make_StatusText(id_to_show_msgid_to_get_name"Friend: %%p2 - Health: %i2")

// Other way to show the health
new Msg[64]
format(Msg63"Friend: %%p2 - Health: %d"get_user_health(id_to_get_name))
Make_StatusText(id_to_show_msgid_to_get_nameMsg
Is necessary to block the statustext and statusvalue msgs to show my statustext msgs? I always block statustext but I don't know really if I must block both messages, only one, or what
__________________

Last edited by IneedHelp; 12-28-2008 at 20:52.
IneedHelp is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-29-2008 , 00:21   Re: How to replace some words in Status text?
Reply With Quote #7

Quote:
Originally Posted by Exolent[jNr] View Post
LIES!
You can but you have to alter players names and teaminfo, and it's a bit tricky.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 12-29-2008 , 01:12   Re: How to replace some words in Status text?
Reply With Quote #8

Quote:
Originally Posted by ConnorMcLeod View Post
You can but you have to alter players names and teaminfo, and it's a bit tricky.
See my post, I always used that statustext stock and I get the target name with '%%p2' ...the name return the color too ^.^
__________________
IneedHelp is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 01-29-2009 , 04:05   Re: How to replace some words in Status text?
Reply With Quote #9

Quote:
You can but you have to alter players names and teaminfo, and it's a bit tricky.
how?
so i just can't write custom colored line there? =0
Owyn is offline
Send a message via ICQ to Owyn
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-29-2009 , 17:57   Re: How to replace some words in Status text?
Reply With Quote #10

Quote:
Originally Posted by IneedHelp View Post
See my post, I always used that statustext stock and I get the target name with '%%p2' ...the name return the color too ^.^
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 09:16.


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