Checking if player is near model
Hi,
I made a plugin who makes a model (like in Cs Surf Board) and I want to decect if palyer is near this model. I tried "FM_Touch" but you must touch model it is not what I want, I want to chceck being near model (few steps). |
Re: Checking if player is near model
Description
entity_range - Returns the distance between two entities. Syntax Float: entity_range ( ida, idb ) Engine code: PHP Code:
|
Re: Checking if player is near model
Quote:
Code:
stock Float:fm_distance_to_box(const Float:point[3], const Float:mins[3], const Float:maxs[3]) { |
Re: Checking if player is near model
Code:
if(entity_range(id, model) < distance ){ |
Re: Checking if player is near model
Make sure 'distance' is a Float.
Code:
|
Re: Checking if player is near model
Oh I had
Quote:
Quote:
|
Re: Checking if player is near model
One more tag mismatch:
new Float:distance distance = register_cvar("amx_dist", "300.0") What's wrong? |
Re: Checking if player is near model
PHP Code:
|
| All times are GMT -4. The time now is 09:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.