Finding Players near Player
Hello. I want to make Mod like Quake 3 Freeze TDM, and I need to find Players near freezed Player. I think about find_sphere_class, but i dont know how to use this with Player and finding other player near him. I want to find number of players and if players are being 7 seconds near freezed Player i want to make something with freezed Player(unfreeze Player).
Any Solutions for this ? |
Re: Finding Players near Player
Well you could try something like this, where check() is simply your function which is called everytime your going to check for players, whether it be in PreThink or a task you set every second or so:
PHP Code:
|
Re: Finding Players near Player
Yes, ofcorse only team mate can unfreeze player.
How to make timer when player unfreeze when plaeyers are near him ? And how work dist? Any number 1 or 300 it's unfreeze from every distance on map ^^ |
Re: Finding Players near Player
Use PreThink for the frozen player and check if the number of teammates around him for 7 seconds.
|
Re: Finding Players near Player
Quote:
HTML Code:
public check( id ) |
Re: Finding Players near Player
Try that... and then obviously you'll reset their frost variable to false on every new round.
PHP Code:
|
Re: Finding Players near Player
Hmmm still nothing. It's freeze for few seconds and unfreeze when i'm and only 1 enemy is ! What is wrong ?
PHP Code:
if( !is_user_alive( player ) || get_user_team( player ) != get_user_team( id ) || id == player) and working perfect :D And now, how to make check when players are near freeze Player 5 seconds then unfreeze Player? Maybe set_task 1 second check(id) and make variable and if this variable = 5 then odmroz(id) ? Yea and i make this :D Working amazing, when i am go out or killed when i unfreezed player then player is still unfreezed :D: PHP Code:
PHP Code:
|
Re: Finding Players near Player
If you want some less task, you could check ham_touch, and after they touched check 7 seconds if he is still near him. So you don't need a task wich is always checking for close players.
|
Re: Finding Players near Player
But ham_touch is "task" repeat 1 second ?
|
Re: Finding Players near Player
Code:
|
| All times are GMT -4. The time now is 14:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.