FindTarget Function

Wraps ProcessTargetString() and handles producing error messages for bad targets.

Note that you should use LoadTranslations("common.phrases") in OnPluginStart(). "common.phrases" contains all of the translatable phrases that FindTarget() will reply with in the event a target is not found (error).

int FindTarget(int client, const char[] target, bool nobots, bool immunity)

Parameters

int client

Client who issued command

const char[] target

Client's target argument

bool nobots

Optional. Set to true if bots should NOT be targetted

bool immunity

Optional. Set to false to ignore target immunity.

Return Value

Index of target client, or -1 on error.