id < 1, id > get_maxplayers, player not connected.
Dunno what happend with HLTVs.
Anyway, put your plugin in debug mode to get detailed errors.
The following checks are made when you use that native :
Code:
#define CHECK_PLAYER(x) \
if (x < 1 || x > gpGlobals->maxClients) { \
MF_LogError(amx, AMX_ERR_NATIVE, "Player out of range (%d)", x); \
return 0; \
} else { \
if (!MF_IsPlayerIngame(x) || FNullEnt(MF_GetPlayerEdict(x))) { \
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", x); \
return 0; \
} \
}
__________________