AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Message_Begin (https://forums.alliedmods.net/showthread.php?t=193875)

Mrki_Drakula 08-23-2012 13:10

Message_Begin
 
Hello.

I've been trying to make a Level Up System with Ranks for my new Jailbreak Mod, and i want to add message above or under the chat. I don't want HUD Message, since im already using one for Server Status, and it looks like i cant add another one. So, this is my code, but it adds on the center of the screen. How i can move it?

PHP Code:

new ime[32
get_user_name(idimecharsmax(ime)) 
static 
cache[512]
format(cache511"Ime: %s\nTim: Cuvari/nLevel: %d^nIskustvo: %d"imeCuvarCin[id], CuvarExp[id])
message_begin(MSG_ONE_UNRELIABLEg_msgStatusText, {0,0,0}, id)
write_byte(0)
write_string(cache)
message_end() 

Thanks. Please be quick :)

Liverwiz 08-23-2012 13:27

Re: Message_Begin
 
new g_msgStatusText = get_user_msgid("SayText")

message_begin(MSG_BROADCAST, g_msgStatusText, {0,0,0}, id)
write_byte(0)
write_string(cache)
message_end()

or you need to put a specific id in the first write_byte(id) to do MSG_ONE_UNRELIABLE

OvidiuS 08-23-2012 13:38

Re: Message_Begin
 
If you are using "StatusText" message you can do this:
Code:
client_cmd( id, "hud_centerid 0" )
but put some menu, so players can accept change.

Mrki_Drakula 08-23-2012 15:22

Re: Message_Begin
 
Thank you very much, solved! :)


All times are GMT -4. The time now is 05:44.

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