30.06.2013, 13:17
I made a very quick search and this came up.
Quote:
Originally Posted by https://sampforum.blast.hk/showthread.php?tid=336052
ProxDetector (proximity detector)
For those who don't know, the famous ProxDetector function was introduced in The Godfather Roleplay. Every time a player would type something into the main chat, it would send the message to the nearby players only, and according to their distance from a player, the message would appear darker or lighter. For instance, if I was 30 feet from a player and they typed in the normal chat, the message would come to me dark. If I were to move closer, the message would become lighter. This function was responsible for making the server chat 'realistic' by sending the message to only the players nearby. Note: Using the easier-to-understand version, the changing in color in light of the player distance will not be featured. PHP код:
This line defines floats that will hold the position of the player. It is important you use the "Float:" tag, because coordinates are decimal numbers. PHP код:
PHP код:
PHP код:
PHP код:
PHP код:
|