Detect distance between Players
I want to detect distance between Id and another players...But something is wrong here
Code:
public client_PreThink(id) |
Re: Detect distance between Players
You do not check if player (variable with name i ) is connected.
|
Re: Detect distance between Players
Code:
if (i == id) continue; |
Re: Detect distance between Players
PHP Code:
|
Re: Detect distance between Players
Now i have this error...I want to disable distance if player in my team
L 06/11/2019 - 14:29:47: [AMXX] Displaying debug trace (plugin "head.amxx", version "1.0") L 06/11/2019 - 14:29:47: [AMXX] Run time error 10: native error (native "cs_get_user_team") L 06/11/2019 - 14:29:47: [AMXX] [0] head.sma::client_PreThink (line 51) this line : if (cs_get_user_team(id) == cs_get_user_team(i)) Code:
public client_PreThink(id) |
Re: Detect distance between Players
put is_user_connected( i ) before checking his team? even better put is_user_alive there
also if you are using returns PLUGIN_HANDLED and PLUGIN_CONTINUE, then no 'need' for return 1/0 |
Re: Detect distance between Players
No don't put anything use get_players instead and what are you trying to achieve? There might be another (better)way without the need of use prethink
|
Re: Detect distance between Players
I want to detect distance for example
If i am TERO detect CT distance If i am CT detect TERO distance How can do that? Code:
#include <amxmodx> |
Re: Detect distance between Players
PHP Code:
I forgot to add the Float tag to fDistance in previous code. |
Re: Detect distance between Players
thanks
|
| All times are GMT -4. The time now is 17:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.