Raised This Month: $ Target: $400
 0% 

Help Hud


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
plazma
Senior Member
Join Date: Oct 2013
Old 05-29-2014 , 16:27   Help Hud
Reply With Quote #1

Its any new Hud Messages because my plugin have Reliable overflow to players. what is the problem?
__________________
Free Palestine ♥
plazma is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-29-2014 , 16:48   Re: Help Hud
Reply With Quote #2

Quote:
Originally Posted by plazma View Post
Its any new Hud Messages because my plugin have Reliable overflow to players. what is the problem?
The problem is I.... have no idea.

Maybe posting the code which is causing the problem will help us help you.

Can't give you an answer without seeing any of your code.
__________________
Blizzard_87 is offline
plazma
Senior Member
Join Date: Oct 2013
Old 05-30-2014 , 06:26   Re: Help Hud
Reply With Quote #3

Something like this :


PHP Code:
#include < amxmodx >
#include < amxmisc >

new g_iMessagesCountg_iVariableg_iAdvertisementsSync;

enum _BLEAHHHRED], GREEN], BLUE], MESSAGE512 ] }

static const 
szMessages[ ][ BLEAHHH ] =
{
    { 
255000000"1 = Hello, it Worked!" },
    { 
000255000"2 = Hello, it Worked!" },
    { 
000000200"3 = Hello, it Worked!" },
    { 
000200000"4 = Hello, it Worked!" },
    { 
200000000"5 = Hello, it Worked!" }
}

public 
plugin_init( )
{
    
register_plugin"Messages Shower""1.0b""[dvL]aditza" );

    
g_iAdvertisementsSync CreateHudSyncObj( );
    
g_iMessagesCount sizeofszMessages ) -1;

    
set_task5.0"Task_HudMessages", .flags"b" );
}

public 
Task_HudMessages( )
{
    if( 
g_iVariable g_iMessagesCount )
        
g_iVariable 0;
    
    
set_hudmessageszMessagesg_iVariable ][ RED  ], szMessagesg_iVariable ][ GREEN ], szMessagesg_iVariable ][ BLUE ], -1.00.2000.512.02.02.0, -);
    
ShowSyncHudMsg0g_iAdvertisementsSync"%s"szMessagesg_iVariable ][ MESSAGE] );

    
g_iVariable++;

__________________
Free Palestine ♥

Last edited by plazma; 05-30-2014 at 06:28.
plazma is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 05-30-2014 , 06:41   Re: Help Hud
Reply With Quote #4

at least set a .2 second delay between them holy shit
sending this to 32 players might even crash the server
aron9forever is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-30-2014 , 07:25   Re: Help Hud
Reply With Quote #5

Reliable overflow comes because you are sending huge data too fast to player.
By huge data i meant the size of hudmessage text.

Quote:
Originally Posted by aron9forever View Post
at least set a .2 second delay between them holy shit
sending this to 32 players might even crash the server
no way...
.Dare Devil. is offline
plazma
Senior Member
Join Date: Oct 2013
Old 05-30-2014 , 07:35   Re: Help Hud
Reply With Quote #6

.Dare Devil. Have any idea for this code ?
__________________
Free Palestine ♥
plazma is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 05-30-2014 , 11:44   Re: Help Hud
Reply With Quote #7

Quote:
Originally Posted by .Dare Devil. View Post
Reliable overflow comes because you are sending huge data too fast to player.
By huge data i meant the size of hudmessage text.


no way...
messages like these are sent over the reliable channel
if an important message fails to get sent to the client because all the bandwidth is taken by these hud messages for example, the server will crash with the error FSB_ALLOWOVERFLOW set on Server Reliable Datagram
aron9forever is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 05-30-2014 , 12:59   Re: Help Hud
Reply With Quote #8

Quote:
Originally Posted by plazma View Post
Something like this :
"Something like this" is not good enough. Sending one hudmessage every five seconds will never overflow the reliable channel and never cause a crash. Either post your plugin or recreate a complete compilable plugin that exhibits the crash. Showing us how to use hudmessages won't help, we know that.

On a side note: sizeof is a compile-time construct and not a runtime function. Saving the result of sizeof into a runtime variable is completely pointless and will not improve performance (quite the contrary actually).
__________________
In Flames we trust!

Last edited by Nextra; 05-30-2014 at 13:00.
Nextra 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 09:39.


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