Raised This Month: $ Target: $400
 0% 

StatusText Message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 01-16-2007 , 01:46   StatusText Message
Reply With Quote #1

Hello!

Alright, im using the StatusText Message to show a text message that is constantly being changed. So I was wondering where is the best place to hook it.
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-16-2007 , 05:04   Re: StatusText Message
Reply With Quote #2

plugin_init, register_event
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 01-16-2007 , 16:08   Re: StatusText Message
Reply With Quote #3

I keep mine constantly updating on different events (client death, cleint spawn, kills, bomb plants, etc..)

Code:
point_hud(id)
{
    new PointHud[65]
    format(PointHud,64,"Points: %i",g_UserPoints[id])
    message_begin(MSG_ONE, get_user_msgid("StatusText"), {0,0,0}, id)
    write_byte(0)
    write_string(PointHud)
    message_end()
}
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 01-16-2007 , 16:20   Re: StatusText Message
Reply With Quote #4

Quote:
Originally Posted by Cheap_Suit View Post
Hello!

Alright, im using the StatusText Message to show a text message that is constantly being changed. So I was wondering where is the best place to hook it.
Hook it when the info is changed.(?)

EDIT: Maby like so?
Code:
#include <amxmodx> new gmsg_StatusText; public plugin_init()     gmsg_StatusText = get_user_msgid("StatusText"); stock show_StatusText(id, str[], len, ...) {     format_args(str, len);     message_begin(MSG_ONE_UNRELIABLE, gmsg_StatusText, {0,0,0}, id);     write_byte(0);     write_string(str);     message_end(); }

Last edited by [ --<-@ ] Black Rose; 01-16-2007 at 16:33.
[ --<-@ ] Black Rose 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 22:27.


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