AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   MSG_ONE or MSG_ONE_UNRELIABLE? (https://forums.alliedmods.net/showthread.php?t=326869)

Shadows Adi 08-20-2020 19:11

MSG_ONE or MSG_ONE_UNRELIABLE?
 
Hello,
I am thinking about those two destinations. Which could be better in the case when I am setting a sprite icon to client?
Code:
message_begin( MSG_ONE / MSG_ONE_UNRELIABLE ?, get_user_msgid("StatusIcon"), {0,0,0}, id )         write_byte( 1)         write_string( "number_1" )         write_byte( 0 )         write_byte( 255 )         write_byte( 0 )         message_end( )
This message is called inside Ham_Spawn Post func.

HamletEagle 08-21-2020 02:55

Re: MSG_ONE or MSG_ONE_UNRELIABLE?
 
MSG_ONE will always send the message, but could cause a crash if too many messages are sent.
MSG_ONE_UNRELIABLE will not send the message if something is wrong.

fysiks 08-21-2020 22:40

Re: MSG_ONE or MSG_ONE_UNRELIABLE?
 
Use unreliable if possible. You probably won't notice when it fails. If you use reliable then the one time that it does fail, it will be very noticeable.

Shadows Adi 08-22-2020 08:46

Re: MSG_ONE or MSG_ONE_UNRELIABLE?
 
Quote:

Originally Posted by HamletEagle (Post 2714993)
MSG_ONE will always send the message, but could cause a crash if too many messages are sent.

Too many messages in the same time or in the same channel?


All times are GMT -4. The time now is 18:52.

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