AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Showing Text above healh (https://forums.alliedmods.net/showthread.php?t=12730)

Cronck 04-23-2005 00:58

Showing Text above healh
 
How do i make normal text just above health like UWC3 shows ur current skill and XP there?

v3x 04-23-2005 01:09

set_task()
set_hudmessage()
show_hudmessage()

;)

Cronck 04-23-2005 01:27

but its not a hud message...?
Its more like staying chat text?

teame06 04-23-2005 01:29

if you want it to say it like chat, use client_print

Cronck 04-23-2005 01:30

i know the client_print command...
Its not a chat message its showing, but it the same text-style

v3x 04-23-2005 03:06

Oh, I know what you mean..

Like..

Human Level 9 XP: 2734/51200

Cronck 04-23-2005 03:25

Yes... Thats the text i'm talking about :D

So, do you know how to make it?

ZiP* 04-23-2005 06:36

The way knekter did it:

Code:
CreateStatusText(const id) {   if(is_user_connected(id) && is_user_alive(id))   {     new Text[61];     if(IsUltimate[id] == true)       format(Text, 60, "[Ultimate %s] Level: %i XP: %i To Next Level: %i", classes[PlayerClass[id]], PlayerLevel[id], PlayerXP[id], levels[PlayerLevel[id]] - PlayerXP[id]);     else if(IsUltimate[id] == true && PlayerLevel[id] == 7)       format(Text, 60, "[Ultimate %s] Level: %i XP: %i", classes[PlayerClass[id]], PlayerLevel[id], PlayerXP[id]);     else format(Text, 60, "[%s] Level: %i XP: %i To Next Level: %i", classes[PlayerClass[id]], PlayerLevel[id], PlayerXP[id], levels[PlayerLevel[id]] - PlayerXP[id]);     message_begin(MSG_ONE, get_user_msgid("StatusText"), {0, 0, 0}, id);     write_byte(0);     write_string(Text);     message_end();     return 1;   }   return 0; }

But i guess there's many ways this can be done.

v3x 04-23-2005 07:32

Oh, duh.. I knew it had to do with that message crap. :)

BioHazardousWaste 04-23-2005 14:56

holy christ.. could someone explaint that to me? because the way it is written doesn't seem to make sense in comparison the the way it is explained in the functionwiki.. the rest is just formatting(i think lol), but this:

Code:
    message_begin(MSG_ONE, get_user_msgid("StatusText"), {0, 0, 0}, id);     write_byte(0);     write_string(Text);     message_end();

What is MSG_ONE, and how is it a destination? Where did "StatusText" come from? It is not mentioned at all (besides this) in the post. What byte are you writing? (if it's nothing, why is it there)?

Some help, please? Thanx


All times are GMT -4. The time now is 09:59.

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