[Solved] Only specific players can see player's message
Hi everyone , is it possible that when players enter a message , only players within a specific distance from that player can see the message , and blocks other players from seeing the message?
|
Re: Only specific players can see player's message
Get all alive players using get_players with the proper flags and loop through them checking the distance between you and the player using get_distance or get_distance_f. When a player is in range, send him the message via client_print, colorchat or however you want.
|
Re: Only specific players can see player's message
Quote:
what I mean is , when player uses "Say" to say messages , all players can see the message , but I want to block the message from being sent to other players out of range , is it possible? |
Re: Only specific players can see player's message
A way that could work is to hook SayText using register_message and check the distance between sender and receiver and if they are not i range return plugin_handled.
|
Re: Only specific players can see player's message
Quote:
|
| All times are GMT -4. The time now is 06:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.