Questions on "message_begin()"
Hi,
We have a private cs 1.6 server. The original smoke as you know is very transparent and does not offer so much utility. I tried all plugins (I think) I could find. None of them work as intended. Then I decided learn why they don't. They all have the same ´problem because they essentially use the same idea to solve the problem. Plugins such as: https://forums.alliedmods.net/showthread.php?p=849413 https://forums.alliedmods.net/showthread.php?p=970945 And that idea is: Code:
message_begin( MSG_BROADCAST, SVC_TEMPENTITY )Now the main problem with this approach is: Players who a re a bit far away from the grenade location or don't have vision, their clients do not draw these sprites on the screen so that means when they arrive to the location there is no smoke. Others closer to the location of course sees the smoke. So I have 2 questions:
|
Re: Questions on "message_begin()"
Use MSG_ALL instead of MSG_BROADCAST
|
Re: Questions on "message_begin()"
Tried all the possibilities already.
MSG_BROADCAST MSG_ALL and in a for loop over all clients I tried: MSG_ONE MSG_ONE_RELIABLE It feels like tempentity depends on the player distance to the entity. |
Re: Questions on "message_begin()"
1st yeha you should use MSG_ALL 2nd mind showing the code to see what we can advise you to do?
|
Re: Questions on "message_begin()"
Well it is basically ColoredSmokenades https://forums.alliedmods.net/attach...5&d=1245089468
But I use it with different sprites. The sprites are over here https://gamebanana.com/effects/6000 Code:
get_players(players, num, "a"); //GetPlayers_ExcludeDead) |
Re: Questions on "message_begin()"
idk the problem but i would do
PHP Code:
|
Re: Questions on "message_begin()"
Quote:
Firstly, a user can not alive without being connected so logically checking both is useless. Secondly, the proper way to iterate over all players is to use get_players. It removes the need to do any kind of validation(connected/alive/bot/dead/whatever) by using proper flags in get_players. Please don't give advice until you actually understand how things work and why they work in a certain way. |
Re: Questions on "message_begin()"
Quote:
|
Re: Questions on "message_begin()"
In the loop condition you have..
PHP Code:
PHP Code:
|
Re: Questions on "message_begin()"
Well I think we should focus on the real problem here. For loop there is just a trial. removing the loop and using MSG_ALL or MSG_BROADCAST have the same problem.
The core issue I think is these messages with TEMPENTITY depends on the distance. It would be very helpful if someone can confirm that. Other approach will be constantly broadcasting this message on a "thinking forward". Right now this function run inside a "FM_EmitSound"and I think it executes only once. If a client is too far away it simply misses it. But it would be nice to get a comment from someone who has knowledge about these. |
| All times are GMT -4. The time now is 14:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.