28.01.2018, 12:16
Quote:
I didn't realize you could do this.
Код:
enum _:E_TYPE_SEARCH(<<= 1) { SEARCH_TYPE_DYNAMIC = 1, SEARCH_TYPE_STATIC, SEARCH_TYPE_ALL = SEARCH_TYPE_DYNAMIC | SEARCH_TYPE_STATIC } Код:
I was looking at a few things here and this doesn't make sense to me. if(type & SEARCH_TYPE_STATIC) { foreach(new i : Static_Actors) { if(!IsPlayerInRangeOfPoint(playerid, range, Static_Actors[i][eapPosX], Static_Actors[i][eapPosY], Static_Actors[i][eapPosZ])) continue; if(actorid != INVALID_ACTOR_ID) return MULTIPLE_TARGET_FOUND; actorid = i; } } |
- That's right. I added a parameter which allow the player to return MULTIPLE_TARGET_FOUND or the first actor in range.