AlliedModders

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

Cadav0r 04-12-2006 08:31

message_begin parameter
 
I have a problem with the function message_begin
I want to display a message on left-corner but I have a native error so I want to know what are possible values of msg_type???

VEN 04-12-2006 09:01

msg_type is client's message id.
I think you want HUD message.
If so use natives set_hudmessage and show_hudmessage.

Cadav0r 04-12-2006 09:25

Ok thanks for this informations i will try with hudmessage

Cadav0r 04-12-2006 09:31

But hudmessage isn't possible here, look :
Code:

                result = dbi_query(dbc,"SELECT * FROM amxwarn2 WHERE authid = '%s'",authid)
                if(result >= RESULT_OK) {
                        // Complete Warn Sum-up
                        new wdate[21], wreason[33], mywarn[5], display[26], display2[26]
                        message_begin(MSG_ONE, get_user_msgid("StatusText"), {0,0,0}, id)
                        write_byte(0)
                        format(mywarn,4,"%L ^n^n","MYWRAN")
                        write_string(mywarn)
                        for(new w=0;w<swarnlevel[id];w++) {
                                dbi_result(result,"date", wdate, 20)
                                dbi_result(result," reason", wreason, 32)
                                format(display, 25," %L: %s", id, "DATE", wdate[20])
                                write_string(display)
                                if (wreason[32]) {
                                        format(display2, 25,"^n %L: %s", id, "REASON", wreason[32])
                                        write_string(display2)
                                }
                                dbi_nextrow(result)
                                if(w != swarnlevel[id]-1)
                                        write_string("^n^n")
                        }
                }
                dbi_free_result(result)
                message_end()

Because the message is in many piece, so if you have other solution...

Thanks

Twilight Suzuka 04-12-2006 19:08

Then FORMAT IT TO A STRING.

Cadav0r 04-13-2006 06:44

Ok I will try it


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

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