3 * ===============================================================
4 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
5 * ===============================================================
7 * This file is not open source and may not be copied without explicit
8 * written permission of AlliedModders LLC. This file may not be redistributed
9 * in whole or significant part.
10 * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
15 #include "PlayerManager.h"
16 #include "AdminCache.h"
17 #include "sm_stringutil.h"
18 #include <inetchannelinfo.h>
20 static cell_t sm_GetClientCount(IPluginContext *pCtx, const cell_t *params)
24 return g_Players.NumPlayers();
27 int maxplayers = g_Players.MaxClients();
29 for (int i=1; i<=maxplayers; ++i)
31 CPlayer *pPlayer = g_Players.GetPlayerByIndex(i);
32 if ((pPlayer->IsConnected()) && !(pPlayer->IsInGame()))
38 return (g_Players.NumPlayers() + count);
41 static cell_t sm_GetMaxClients(IPluginContext *pCtx, const cell_t *params)
43 return g_Players.MaxClients();
46 static cell_t sm_GetClientName(IPluginContext *pCtx, const cell_t *params)
48 int index = params[1];
49 if ((index < 1) || (index > g_Players.GetMaxClients()))
51 return pCtx->ThrowNativeError("Invalid client index %d", index);
54 CPlayer *pPlayer = g_Players.GetPlayerByIndex(index);
55 if (!pPlayer->IsConnected())
57 return pCtx->ThrowNativeError("Client %d is not connected", index);
60 pCtx->StringToLocalUTF8(params[2], static_cast<size_t>(params[3]), pPlayer->GetName(), NULL);
64 static cell_t sm_GetClientIP(IPluginContext *pCtx, const cell_t *params)
66 int index = params[1];
67 if ((index < 1) || (index > g_Players.GetMaxClients()))
69 return pCtx->ThrowNativeError("Invalid client index %d", index);
72 CPlayer *pPlayer = g_Players.GetPlayerByIndex(index);
73 if (!pPlayer->IsConnected())
75 return pCtx->ThrowNativeError("Client %d is not connected", index);
79 strcpy(buf, pPlayer->GetIPAddress());
81 if (params[4] && (ptr = strchr(buf, ':')))
86 pCtx->StringToLocal(params[2], static_cast<size_t>(params[3]), buf);
90 static cell_t sm_GetClientAuthStr(IPluginContext *pCtx, const cell_t *params)
92 int index = params[1];
93 if ((index < 1) || (index > g_Players.GetMaxClients()))
95 return pCtx->ThrowNativeError("Invalid client index %d", index);
98 CPlayer *pPlayer = g_Players.GetPlayerByIndex(index);
99 if (!pPlayer->IsConnected())
101 return pCtx->ThrowNativeError("Client %d is not connected", index);
104 if (!pPlayer->IsAuthorized())
109 pCtx->StringToLocal(params[2], static_cast<size_t>(params[3]), pPlayer->GetAuthString());
114 static cell_t sm_IsPlayerConnected(IPluginContext *pCtx, const cell_t *params)
116 int index = params[1];
117 if ((index < 1) || (index > g_Players.GetMaxClients()))
119 return pCtx->ThrowNativeError("Invalid client index %d", index);
122 return (g_Players.GetPlayerByIndex(index)->IsConnected()) ? 1 : 0;
125 static cell_t sm_IsPlayerIngame(IPluginContext *pCtx, const cell_t *params)
127 int index = params[1];
128 if ((index < 1) || (index > g_Players.GetMaxClients()))
130 return pCtx->ThrowNativeError("Invalid client index %d", index);
133 return (g_Players.GetPlayerByIndex(index)->IsInGame()) ? 1 : 0;
136 static cell_t sm_IsPlayerAuthorized(IPluginContext *pCtx, const cell_t *params)
138 int index = params[1];
139 if ((index < 1) || (index > g_Players.GetMaxClients()))
141 return pCtx->ThrowNativeError("Invalid client index %d", index);
144 return (g_Players.GetPlayerByIndex(index)->IsAuthorized()) ? 1 : 0;
147 static cell_t sm_IsPlayerFakeClient(IPluginContext *pCtx, const cell_t *params)
149 int index = params[1];
150 if ((index < 1) || (index > g_Players.GetMaxClients()))
152 return pCtx->ThrowNativeError("Invalid client index %d", index);
155 CPlayer *pPlayer = g_Players.GetPlayerByIndex(index);
156 if (!pPlayer->IsConnected())
158 return pCtx->ThrowNativeError("Client %d is not connected", index);
161 return (pPlayer->IsFakeClient()) ? 1 : 0;
164 static cell_t sm_GetClientInfo(IPluginContext *pContext, const cell_t *params)
166 int client = params[1];
167 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
170 return pContext->ThrowNativeError("Invalid client index %d", client);
172 if (!pPlayer->IsConnected())
174 return pContext->ThrowNativeError("Client %d is not connected", client);
178 pContext->LocalToString(params[2], &key);
180 const char *val = engine->GetClientConVarValue(client, key);
186 pContext->StringToLocalUTF8(params[3], params[4], val, NULL);
190 static cell_t SetUserAdmin(IPluginContext *pContext, const cell_t *params)
192 int client = params[1];
193 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
196 return pContext->ThrowNativeError("Invalid client index %d", client);
198 if (!pPlayer->IsConnected())
200 return pContext->ThrowNativeError("Client %d is not connected", client);
202 if (!g_Admins.IsValidAdmin(params[2]))
204 return pContext->ThrowNativeError("AdminId %x is not valid", params[2]);
207 pPlayer->SetAdminId(params[2], params[3] ? true : false);
212 static cell_t GetUserAdmin(IPluginContext *pContext, const cell_t *params)
214 int client = params[1];
215 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
218 return pContext->ThrowNativeError("Invalid client index %d", client);
220 if (!pPlayer->IsConnected())
222 return pContext->ThrowNativeError("Client %d is not connected", client);
225 return pPlayer->GetAdminId();
228 static cell_t AddUserFlags(IPluginContext *pContext, const cell_t *params)
230 int client = params[1];
231 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
234 return pContext->ThrowNativeError("Invalid client index %d", client);
236 if (!pPlayer->IsConnected())
238 return pContext->ThrowNativeError("Client %d is not connected", client);
242 if ((id=pPlayer->GetAdminId()) == INVALID_ADMIN_ID)
244 id = g_Admins.CreateAdmin(NULL);
245 pPlayer->SetAdminId(id, true);
249 for (int i=2; i<=params[0]; i++)
251 pContext->LocalToPhysAddr(params[i], &addr);
252 g_Admins.SetAdminFlag(id, (AdminFlag)*addr, true);
258 static cell_t RemoveUserFlags(IPluginContext *pContext, const cell_t *params)
260 int client = params[1];
261 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
264 return pContext->ThrowNativeError("Invalid client index %d", client);
266 if (!pPlayer->IsConnected())
268 return pContext->ThrowNativeError("Client %d is not connected", client);
272 if ((id=pPlayer->GetAdminId()) == INVALID_ADMIN_ID)
278 for (int i=2; i<=params[0]; i++)
280 pContext->LocalToPhysAddr(params[i], &addr);
281 g_Admins.SetAdminFlag(id, (AdminFlag)*addr, false);
287 static cell_t SetUserFlagBits(IPluginContext *pContext, const cell_t *params)
289 int client = params[1];
290 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
293 return pContext->ThrowNativeError("Invalid client index %d", client);
295 if (!pPlayer->IsConnected())
297 return pContext->ThrowNativeError("Client %d is not connected", client);
301 if ((id=pPlayer->GetAdminId()) == INVALID_ADMIN_ID)
303 id = g_Admins.CreateAdmin(NULL);
304 pPlayer->SetAdminId(id, true);
307 g_Admins.SetAdminFlags(id, Access_Effective, params[2]);
312 static cell_t GetUserFlagBits(IPluginContext *pContext, const cell_t *params)
314 int client = params[1];
315 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
318 return pContext->ThrowNativeError("Invalid client index %d", client);
320 if (!pPlayer->IsConnected())
322 return pContext->ThrowNativeError("Client %d is not connected", client);
326 if ((id=pPlayer->GetAdminId()) == INVALID_ADMIN_ID)
331 return g_Admins.GetAdminFlags(id, Access_Effective);
334 static cell_t GetClientUserId(IPluginContext *pContext, const cell_t *params)
336 int client = params[1];
337 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
340 return pContext->ThrowNativeError("Invalid client index %d", client);
342 if (!pPlayer->IsConnected())
344 return pContext->ThrowNativeError("Client %d is not connected", client);
347 return engine->GetPlayerUserId(pPlayer->GetEdict());
350 static cell_t CanUserTarget(IPluginContext *pContext, const cell_t *params)
352 int client = params[1];
353 int target = params[2];
355 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
358 return pContext->ThrowNativeError("Player %d is not a valid client", client);
359 } else if (!pPlayer->IsConnected()) {
360 return pContext->ThrowNativeError("Player %d is not connected", client);
363 CPlayer *pTarget = g_Players.GetPlayerByIndex(target);
366 return pContext->ThrowNativeError("Player %d is not a valid client", target);
367 } else if (!pTarget->IsConnected()) {
368 return pContext->ThrowNativeError("Player %d is not connected", target);
371 return g_Admins.CanAdminTarget(pPlayer->GetAdminId(), pTarget->GetAdminId()) ? 1 : 0;
374 static cell_t GetClientTeam(IPluginContext *pContext, const cell_t *params)
376 int client = params[1];
378 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
381 return pContext->ThrowNativeError("Player %d is not a valid client", client);
382 } else if (!pPlayer->IsInGame()) {
383 return pContext->ThrowNativeError("Player %d is not in game", client);
386 IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
389 return pContext->ThrowNativeError("IPlayerInfo not supported by game");
392 return pInfo->GetTeamIndex();
395 static cell_t GetFragCount(IPluginContext *pContext, const cell_t *params)
397 int client = params[1];
399 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
402 return pContext->ThrowNativeError("Player %d is not a valid client", client);
403 } else if (!pPlayer->IsInGame()) {
404 return pContext->ThrowNativeError("Player %d is not in game", client);
407 IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
410 return pContext->ThrowNativeError("IPlayerInfo not supported by game");
413 return pInfo->GetFragCount();
416 static cell_t GetDeathCount(IPluginContext *pContext, const cell_t *params)
418 int client = params[1];
420 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
423 return pContext->ThrowNativeError("Player %d is not a valid client", client);
424 } else if (!pPlayer->IsInGame()) {
425 return pContext->ThrowNativeError("Player %d is not in game", client);
428 IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
431 return pContext->ThrowNativeError("IPlayerInfo not supported by game");
434 return pInfo->GetDeathCount();
437 static cell_t GetArmorValue(IPluginContext *pContext, const cell_t *params)
439 int client = params[1];
441 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
444 return pContext->ThrowNativeError("Player %d is not a valid client", client);
445 } else if (!pPlayer->IsInGame()) {
446 return pContext->ThrowNativeError("Player %d is not in game", client);
449 IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
452 return pContext->ThrowNativeError("IPlayerInfo not supported by game");
455 return pInfo->GetArmorValue();
458 static cell_t GetAbsOrigin(IPluginContext *pContext, const cell_t *params)
460 int client = params[1];
462 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
465 return pContext->ThrowNativeError("Player %d is not a valid client", client);
466 } else if (!pPlayer->IsInGame()) {
467 return pContext->ThrowNativeError("Player %d is not in game", client);
470 IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
473 return pContext->ThrowNativeError("IPlayerInfo not supported by game");
477 pContext->LocalToPhysAddr(params[2], &pVec);
479 Vector vec = pInfo->GetAbsOrigin();
480 pVec[0] = sp_ftoc(vec.x);
481 pVec[1] = sp_ftoc(vec.y);
482 pVec[2] = sp_ftoc(vec.z);
487 static cell_t GetAbsAngles(IPluginContext *pContext, const cell_t *params)
489 int client = params[1];
491 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
494 return pContext->ThrowNativeError("Player %d is not a valid client", client);
495 } else if (!pPlayer->IsInGame()) {
496 return pContext->ThrowNativeError("Player %d is not in game", client);
499 IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
502 return pContext->ThrowNativeError("IPlayerInfo not supported by game");
506 pContext->LocalToPhysAddr(params[2], &pAng);
508 QAngle ang = pInfo->GetAbsAngles();
509 pAng[0] = sp_ftoc(ang.x);
510 pAng[1] = sp_ftoc(ang.y);
511 pAng[2] = sp_ftoc(ang.z);
516 static cell_t GetPlayerMins(IPluginContext *pContext, const cell_t *params)
518 int client = params[1];
520 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
523 return pContext->ThrowNativeError("Player %d is not a valid client", client);
524 } else if (!pPlayer->IsInGame()) {
525 return pContext->ThrowNativeError("Player %d is not in game", client);
528 IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
531 return pContext->ThrowNativeError("IPlayerInfo not supported by game");
535 pContext->LocalToPhysAddr(params[2], &pVec);
537 Vector vec = pInfo->GetPlayerMins();
538 pVec[0] = sp_ftoc(vec.x);
539 pVec[1] = sp_ftoc(vec.y);
540 pVec[2] = sp_ftoc(vec.z);
545 static cell_t GetPlayerMaxs(IPluginContext *pContext, const cell_t *params)
547 int client = params[1];
549 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
552 return pContext->ThrowNativeError("Player %d is not a valid client", client);
553 } else if (!pPlayer->IsInGame()) {
554 return pContext->ThrowNativeError("Player %d is not in game", client);
557 IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
560 return pContext->ThrowNativeError("IPlayerInfo not supported by game");
564 pContext->LocalToPhysAddr(params[2], &pVec);
566 Vector vec = pInfo->GetPlayerMaxs();
567 pVec[0] = sp_ftoc(vec.x);
568 pVec[1] = sp_ftoc(vec.y);
569 pVec[2] = sp_ftoc(vec.z);
574 static cell_t GetWeaponName(IPluginContext *pContext, const cell_t *params)
576 int client = params[1];
578 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
581 return pContext->ThrowNativeError("Player %d is not a valid client", client);
582 } else if (!pPlayer->IsInGame()) {
583 return pContext->ThrowNativeError("Player %d is not in game", client);
586 IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
589 return pContext->ThrowNativeError("IPlayerInfo not supported by game");
592 pContext->StringToLocalUTF8(params[2], static_cast<size_t>(params[3]), pInfo->GetWeaponName(), NULL);
597 static cell_t GetModelName(IPluginContext *pContext, const cell_t *params)
599 int client = params[1];
601 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
604 return pContext->ThrowNativeError("Player %d is not a valid client", client);
605 } else if (!pPlayer->IsInGame()) {
606 return pContext->ThrowNativeError("Player %d is not in game", client);
609 IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
612 return pContext->ThrowNativeError("IPlayerInfo not supported by game");
615 pContext->StringToLocalUTF8(params[2], static_cast<size_t>(params[3]), pInfo->GetModelName(), NULL);
620 static cell_t GetHealth(IPluginContext *pContext, const cell_t *params)
622 int client = params[1];
624 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
627 return pContext->ThrowNativeError("Player %d is not a valid client", client);
628 } else if (!pPlayer->IsInGame()) {
629 return pContext->ThrowNativeError("Player %d is not in game", client);
632 IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
635 return pContext->ThrowNativeError("IPlayerInfo not supported by game");
638 return pInfo->GetHealth();
641 static cell_t GetTimeConnected(IPluginContext *pContext, const cell_t *params)
643 int client = params[1];
645 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
648 return pContext->ThrowNativeError("Player %d is not a valid client", client);
649 } else if (!pPlayer->IsInGame()) {
650 return pContext->ThrowNativeError("Player %d is not in game", client);
651 } else if (pPlayer->IsFakeClient()) {
652 return pContext->ThrowNativeError("Player %d is a bot", client);
655 INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
657 return sp_ftoc(pInfo->GetTimeConnected());
660 static cell_t GetDataRate(IPluginContext *pContext, const cell_t *params)
662 int client = params[1];
664 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
667 return pContext->ThrowNativeError("Player %d is not a valid client", client);
668 } else if (!pPlayer->IsInGame()) {
669 return pContext->ThrowNativeError("Player %d is not in game", client);
670 } else if (pPlayer->IsFakeClient()) {
671 return pContext->ThrowNativeError("Player %d is a bot", client);
674 INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
676 return pInfo->GetDataRate();
679 static cell_t IsTimingOut(IPluginContext *pContext, const cell_t *params)
681 int client = params[1];
683 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
686 return pContext->ThrowNativeError("Player %d is not a valid client", client);
687 } else if (!pPlayer->IsInGame()) {
688 return pContext->ThrowNativeError("Player %d is not in game", client);
689 } else if (pPlayer->IsFakeClient()) {
690 return pContext->ThrowNativeError("Player %d is a bot", client);
693 INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
695 return pInfo->IsTimingOut() ? 1 : 0;
698 static cell_t GetLatency(IPluginContext *pContext, const cell_t *params)
700 int client = params[1];
702 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
705 return pContext->ThrowNativeError("Player %d is not a valid client", client);
706 } else if (!pPlayer->IsInGame()) {
707 return pContext->ThrowNativeError("Player %d is not in game", client);
708 } else if (pPlayer->IsFakeClient()) {
709 return pContext->ThrowNativeError("Player %d is a bot", client);
712 INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
714 return sp_ftoc(pInfo->GetLatency(params[2]));
717 static cell_t GetAvgLatency(IPluginContext *pContext, const cell_t *params)
719 int client = params[1];
721 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
724 return pContext->ThrowNativeError("Player %d is not a valid client", client);
725 } else if (!pPlayer->IsInGame()) {
726 return pContext->ThrowNativeError("Player %d is not in game", client);
727 } else if (pPlayer->IsFakeClient()) {
728 return pContext->ThrowNativeError("Player %d is a bot", client);
731 INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
733 return sp_ftoc(pInfo->GetAvgLatency(params[2]));
736 static cell_t GetAvgLoss(IPluginContext *pContext, const cell_t *params)
738 int client = params[1];
740 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
743 return pContext->ThrowNativeError("Player %d is not a valid client", client);
744 } else if (!pPlayer->IsInGame()) {
745 return pContext->ThrowNativeError("Player %d is not in game", client);
746 } else if (pPlayer->IsFakeClient()) {
747 return pContext->ThrowNativeError("Player %d is a bot", client);
750 INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
752 return sp_ftoc(pInfo->GetAvgLoss(params[2]));
755 static cell_t GetAvgChoke(IPluginContext *pContext, const cell_t *params)
757 int client = params[1];
759 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
762 return pContext->ThrowNativeError("Player %d is not a valid client", client);
763 } else if (!pPlayer->IsInGame()) {
764 return pContext->ThrowNativeError("Player %d is not in game", client);
765 } else if (pPlayer->IsFakeClient()) {
766 return pContext->ThrowNativeError("Player %d is a bot", client);
769 INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
771 return sp_ftoc(pInfo->GetAvgChoke(params[2]));
774 static cell_t GetAvgData(IPluginContext *pContext, const cell_t *params)
776 int client = params[1];
778 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
781 return pContext->ThrowNativeError("Player %d is not a valid client", client);
782 } else if (!pPlayer->IsInGame()) {
783 return pContext->ThrowNativeError("Player %d is not in game", client);
784 } else if (pPlayer->IsFakeClient()) {
785 return pContext->ThrowNativeError("Player %d is a bot", client);
788 INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
790 return sp_ftoc(pInfo->GetAvgData(params[2]));
793 static cell_t GetAvgPackets(IPluginContext *pContext, const cell_t *params)
795 int client = params[1];
797 CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
800 return pContext->ThrowNativeError("Player %d is not a valid client", client);
801 } else if (!pPlayer->IsInGame()) {
802 return pContext->ThrowNativeError("Player %d is not in game", client);
803 } else if (pPlayer->IsFakeClient()) {
804 return pContext->ThrowNativeError("Player %d is a bot", client);
807 INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
809 return sp_ftoc(pInfo->GetAvgPackets(params[2]));
812 static cell_t GetClientOfUserId(IPluginContext *pContext, const cell_t *params)
814 return g_Players.GetClientOfUserId(params[1]);
817 REGISTER_NATIVES(playernatives)
819 {"AddUserFlags", AddUserFlags},
820 {"CanUserTarget", CanUserTarget},
821 {"GetClientAuthString", sm_GetClientAuthStr},
822 {"GetClientCount", sm_GetClientCount},
823 {"GetClientInfo", sm_GetClientInfo},
824 {"GetClientIP", sm_GetClientIP},
825 {"GetClientName", sm_GetClientName},
826 {"GetClientTeam", GetClientTeam},
827 {"GetClientUserId", GetClientUserId},
828 {"GetMaxClients", sm_GetMaxClients},
829 {"GetUserAdmin", GetUserAdmin},
830 {"GetUserFlagBits", GetUserFlagBits},
831 {"IsClientAuthorized", sm_IsPlayerAuthorized},
832 {"IsClientConnected", sm_IsPlayerConnected},
833 {"IsFakeClient", sm_IsPlayerFakeClient},
834 {"IsPlayerInGame", sm_IsPlayerIngame},
835 {"RemoveUserFlags", RemoveUserFlags},
836 {"SetUserAdmin", SetUserAdmin},
837 {"SetUserFlagBits", SetUserFlagBits},
838 {"GetClientDeaths", GetDeathCount},
839 {"GetClientFrags", GetFragCount},
840 {"GetClientArmor", GetArmorValue},
841 {"GetClientAbsOrigin", GetAbsOrigin},
842 {"GetClientAbsAngles", GetAbsAngles},
843 {"GetClientMins", GetPlayerMins},
844 {"GetClientMaxs", GetPlayerMaxs},
845 {"GetClientWeapon", GetWeaponName},
846 {"GetClientModel", GetModelName},
847 {"GetClientHealth", GetHealth},
848 {"GetClientTime", GetTimeConnected},
849 {"GetClientDataRate", GetDataRate},
850 {"IsClentTimingOut", IsTimingOut},
851 {"GetClientLatency", GetLatency},
852 {"GetClientAvgLatency", GetAvgLatency},
853 {"GetClientAvgLoss", GetAvgLoss},
854 {"GetClientAvgChoke", GetAvgChoke},
855 {"GetClientAvgData", GetAvgData},
856 {"GetClientAvgPackets", GetAvgPackets},
857 {"GetClientOfUserId", GetClientOfUserId},