AlliedModders

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

sbornes 04-05-2011 16:51

[Help] Message_Begin
 
PHP Code:

public ShowHud(id)
{
    
set_task(0.1"ShowHud"id)        
    if( !
is_user_aliveid ))    
        return 
PLUGIN_CONTINUE

    
{
        
        new 
sText[256];
        new 
next_level PlayerLevel[id]
        new 
RemainingXP LEVELSnext_level ] - PlayerXPid ]
        
        
formatexsTextcharsmaxsText ),"[ Level: %i ] [ XP: %i/%i ( %i ) ] [ Class: %s ]",PlayerLevel[id], PlayerXP[id], LEVELS[next_level], RemainingXPCLASSES[PlayerClass[id]]);
        
        
message_begin(MSG_ONEget_user_msgid("StatusText"), {000}, id);
        
write_byte(id);
        
write_string(sText);
        
message_end();  
    
    }


    return 
PLUGIN_CONTINUE


Can someone tell me why that gives MSG_ONE or MSG_ONE UNRELIABLE with no target entity hud message,

Exolent[jNr] 04-05-2011 17:16

Re: [Help] Message_Begin
 
It doesn't. You are using MSG_ALL so the error cannot come from there.

sbornes 04-05-2011 17:19

Re: [Help] Message_Begin
 
oh oops it was a MSG_ONE, was changing it to see what would happen, forgot to change back.


All times are GMT -4. The time now is 20:11.

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