plugins/include/clients.inc
author Fyren <fyrenmoo@gmail.com>
Sun Mar 01 16:41:44 2009 -0500 (2009-03-01)
changeset 2637 ed7b03e3bf16
parent 2591 15213de19689
child 2672 b18381375d17
child 2696 32a50b96b644
permissions -rw-r--r--
Added case insensitivity search to ReplaceString (bug 3639, r=dvander).
     1 /**
     2  * vim: set ts=4 :
     3  * =============================================================================
     4  * SourceMod (C)2004-2008 AlliedModders LLC.  All rights reserved.
     5  * =============================================================================
     6  *
     7  * This file is part of the SourceMod/SourcePawn SDK.
     8  *
     9  * This program is free software; you can redistribute it and/or modify it under
    10  * the terms of the GNU General Public License, version 3.0, as published by the
    11  * Free Software Foundation.
    12  * 
    13  * This program is distributed in the hope that it will be useful, but WITHOUT
    14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    15  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
    16  * details.
    17  *
    18  * You should have received a copy of the GNU General Public License along with
    19  * this program.  If not, see <http://www.gnu.org/licenses/>.
    20  *
    21  * As a special exception, AlliedModders LLC gives you permission to link the
    22  * code of this program (as well as its derivative works) to "Half-Life 2," the
    23  * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
    24  * by the Valve Corporation.  You must obey the GNU General Public License in
    25  * all respects for all other code used.  Additionally, AlliedModders LLC grants
    26  * this exception to all derivative works.  AlliedModders LLC defines further
    27  * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
    28  * or <http://www.sourcemod.net/license.php>.
    29  *
    30  * Version: $Id$
    31  */
    32 
    33 #if defined _clients_included
    34  #endinput
    35 #endif
    36 #define _clients_included
    37 
    38 /**
    39  * Network flow directions.
    40  */
    41 enum NetFlow
    42 {
    43 	NetFlow_Outgoing = 0,	/**< Outgoing traffic */
    44 	NetFlow_Incoming,		/**< Incoming traffic */
    45 	NetFlow_Both,			/**< Both values added together */
    46 };
    47 
    48 /**
    49  * MAXPLAYERS is not the same as MaxClients.
    50  * MAXPLAYERS is a hardcoded value as an upper limit.  MaxClients changes based on the server.
    51  *
    52  * Both GetMaxClients() and MaxClients are only available once the map is loaded, and should 
    53  * not be used in OnPluginStart().
    54  */
    55 
    56 #define MAXPLAYERS		64	/**< Maximum number of players SourceMod supports */
    57 #define MAX_NAME_LENGTH 32	/**< Maximum buffer required to store a client name */
    58 
    59 public const MaxClients;	/**< Maximum number of players the server supports (dynamic) */
    60 
    61 /**
    62  * Called on client connection.  If you return true, the client will be allowed in the server.
    63  * If you return false (or return nothing), the client will be rejected.  If the client is 
    64  * rejected by this forward or any other, OnClientDisconnect will not be called.
    65  *
    66  * @param client		Client index.
    67  * @param rejectmsg		Buffer to store the rejection message when the connection is refused.
    68  * @param maxlen		Maximum number of characters for rejection buffer.
    69  * @return				True to validate client's connection, false to refuse it.
    70  */
    71 forward bool:OnClientConnect(client, String:rejectmsg[], maxlen);
    72 
    73 /**
    74  * Called once a client successfully connects.  This callback is paired with OnClientDisconnect.
    75  *
    76  * @param client		Client index.
    77  * @noreturn
    78  */
    79 forward OnClientConnected(client);
    80 
    81 /**
    82  * Called when a client is entering the game.
    83  *
    84  * Whether a client has a steamid is undefined until OnClientAuthorized
    85  * is called, which may occur either before or after OnClientPutInServer.
    86  * Similarly, use OnClientPostAdminCheck() if you need to verify whether 
    87  * connecting players are admins.
    88  *
    89  * GetClientCount() will include clients as they are passed through this 
    90  * function, as clients are already in game at this point.
    91  *
    92  * @param client		Client index.
    93  * @noreturn
    94  */
    95 forward OnClientPutInServer(client);
    96 
    97 /**
    98  * Called when a client is disconnecting from the server.
    99  *
   100  * @param client		Client index.
   101  * @noreturn
   102  */
   103 forward OnClientDisconnect(client);
   104 
   105 /**
   106  * Called when a client is disconnected from the server.
   107  *
   108  * @param client		Client index.
   109  * @noreturn
   110  */
   111 forward OnClientDisconnect_Post(client);
   112 
   113 /**
   114  * Called when a client is sending a command.
   115  *
   116  * @param client		Client index.
   117  * @param args			Number of arguments.
   118  * @noreturn
   119  */
   120 forward Action:OnClientCommand(client, args);
   121 
   122 /**
   123  * Called whenever the client's settings are changed.
   124  *
   125  * @param client		Client index.
   126  * @noreturn
   127  */
   128 forward OnClientSettingsChanged(client);
   129 
   130 /**
   131  * Called when a client receives a Steam ID.  The state of a client's 
   132  * authorization via Steam or as an admin is not guaranteed here.  
   133  * Use OnClientAuthorized() or OnClientPostAdminCheck() for those, 
   134  * respectively.
   135  *
   136  * This is called by bots, but the ID will be "BOT".
   137  *
   138  * @param client		Client index.
   139  * @param auth			Client auth string.
   140  * @noreturn
   141  */
   142 forward OnClientAuthorized(client, const String:auth[]);
   143 
   144 /**
   145  * Called once a client is authorized and fully in-game, but 
   146  * before admin checks are done.  This can be used to override 
   147  * the default admin checks for a client.  You should only use 
   148  * this for overriding; use OnClientPostAdminCheck() instead 
   149  * if you want notification.
   150  *
   151  * Note: If handled/blocked, PostAdminCheck must be signalled 
   152  * manually via NotifyPostAdminCheck().
   153  *
   154  * This callback is gauranteed to occur on all clients, and always 
   155  * after each OnClientPutInServer() call.
   156  *
   157  * @param client		Client index.
   158  * @return				Plugin_Handled to block admin checks.
   159  */
   160 forward Action:OnClientPreAdminCheck(client);
   161 
   162 /**
   163  * Called directly before OnClientPostAdminCheck() as a method to 
   164  * alter administrative permissions before plugins perform final 
   165  * post-connect operations.  
   166  *
   167  * In general, do not use this function unless you are specifically 
   168  * attempting to change access permissions.  Use OnClientPostAdminCheck() 
   169  * instead if you simply want to perform post-connect authorization 
   170  * routines.
   171  *
   172  * See OnClientPostAdminCheck() for more information.
   173  *
   174  * @param client		Client index.
   175  * @noreturn
   176  */
   177 forward OnClientPostAdminFilter(client);
   178 
   179 /**
   180  * Called once a client is authorized and fully in-game, and 
   181  * after all post-connection authorizations have been performed.  
   182  *
   183  * This callback is gauranteed to occur on all clients, and always 
   184  * after each OnClientPutInServer() call.
   185  *
   186  * @param client		Client index.
   187  * @noreturn
   188  */
   189 forward OnClientPostAdminCheck(client);
   190 
   191 /**
   192  * This function will be deprecated in a future release.  Use the MaxClients variable instead.
   193  *
   194  * Returns the maximum number of clients allowed on the server.  This may 
   195  * return 0 if called before OnMapStart(), and thus should not be called 
   196  * in OnPluginStart().  
   197  *
   198  * You should not globally cache the value to GetMaxClients() because it can change from 
   199  * SourceTV or TF2's arena mode.  Use the "MaxClients" dynamic variable documented at the 
   200  * top of this file.
   201  *
   202  * @return				Maximum number of clients allowed.
   203  */
   204 native GetMaxClients();
   205 
   206 /**
   207  * Returns the client count put in the server.
   208  *
   209  * @param inGameOnly	If false connecting players are also counted.
   210  * @return				Client count in the server.
   211  */
   212 native GetClientCount(bool:inGameOnly=true);
   213 
   214 /**
   215  * Returns the client's name.
   216  *
   217  * @param client		Player index.
   218  * @param name			Buffer to store the client's name.
   219  * @param maxlen		Maximum length of string buffer (includes NULL terminator).
   220  * @return				True on success, false otherwise.
   221  * @error				If the client is not connected an error will be thrown.
   222  */
   223 native bool:GetClientName(client, String:name[], maxlen);
   224 
   225 /**
   226  * Retrieves a client's IP address.
   227  *
   228  * @param client		Player index.
   229  * @param name			Buffer to store the client's ip address.
   230  * @param maxlen		Maximum length of string buffer (includes NULL terminator).
   231  * @param remport		Remove client's port from the ip string (true by default).
   232  * @return				True on success, false otherwise.
   233  * @error				If the client is not connected or the index is invalid.
   234  */
   235 native bool:GetClientIP(client, String:ip[], maxlen, bool:remport=true);
   236 
   237 /**
   238  * Retrieves a client's authentication string (SteamID).
   239  *
   240  * @param client		Player index.
   241  * @param auth			Buffer to store the client's auth string.
   242  * @param maxlen		Maximum length of string buffer (includes NULL terminator).
   243  * @return				True on success, false otherwise.
   244  * @error				If the client is not connected or the index is invalid.
   245  */
   246 native bool:GetClientAuthString(client, String:auth[], maxlen);
   247 
   248 /**
   249  * Retrieves a client's user id, which is an index incremented for every client
   250  * that joins the server.
   251  *
   252  * @param client		Player index.
   253  * @return				User id of the client.
   254  * @error 				If the client is not connected or the index is invalid.
   255  */
   256 native GetClientUserId(client);
   257 
   258 /**
   259  * Returns if a certain player is connected.
   260  *
   261  * @param client		Player index.
   262  * @return				True if player is connected to the server, false otherwise.
   263  */
   264 native bool:IsClientConnected(client);
   265 
   266 /**
   267  * Returns if a certain player has entered the game.
   268  *
   269  * @param client		Player index (index does not have to be connected).
   270  * @return				True if player has entered the game, false otherwise.
   271  * @error				Invalid client index.
   272  */
   273 native bool:IsClientInGame(client);
   274 
   275 /**
   276  * Returns if a client is in the "kick queue" (i.e. the client will be kicked 
   277  * shortly and thus they should not appear as valid).
   278  *
   279  * @param client		Player index (must be connected).
   280  * @return				True if in the kick queue, false otherwise.
   281  * @error				Invalid client index.
   282  */
   283 native bool:IsClientInKickQueue(client);
   284 
   285 /**
   286  * Backwards compatibility stock - use IsClientInGame
   287  * @deprecated			Renamed to IsClientInGame
   288  */
   289 #pragma deprecated Use IsClientInGame() instead
   290 stock bool:IsPlayerInGame(client)
   291 {
   292 	return IsClientInGame(client);
   293 }
   294 
   295 /**
   296  * Returns if a certain player has been authenticated.
   297  *
   298  * @param client		Player index.
   299  * @return				True if player has been authenticated, false otherwise.
   300  */
   301 native bool:IsClientAuthorized(client);
   302 
   303 /**
   304  * Returns if a certain player is a fake client.
   305  *
   306  * @param client		Player index.
   307  * @return				True if player is a fake client, false otherwise.
   308  */
   309 native bool:IsFakeClient(client);
   310 
   311 /**
   312  * Returns if a certain player is an observer/spectator.
   313  *
   314  * @param client		Player index.
   315  * @return				True if player is an obverser, false otherwise.
   316  */
   317 native bool:IsClientObserver(client);
   318 
   319 /**
   320  * Returns if the client is alive or dead.
   321  *
   322  * Note: This function was originally in SDKTools and was moved to core.
   323  *
   324  * @param client		Player's index.
   325  * @return				True if the client is alive, false otherwise.
   326  * @error				Invalid client index, client not in game, or no mod support.
   327  */
   328 native bool:IsPlayerAlive(client);
   329 
   330 /**
   331  * Retrieves values from client replicated keys.
   332  *
   333  * @param client		Player's index.
   334  * @param key			Key string.
   335  * @param value			Buffer to store value.
   336  * @param maxlen		Maximum length of valve (UTF-8 safe).
   337  * @return 				True on success, false otherwise.
   338  * @error				Invalid client index, or client not connected.
   339  */
   340 native bool:GetClientInfo(client, const String:key[], String:value[], maxlen);
   341 
   342 /**
   343  * Retrieves a client's team index.
   344  *
   345  * @param client		Player's index.
   346  * @return				Team index the client is on (mod specific).
   347  * @error				Invalid client index, client not in game, or no mod support.
   348  */
   349 native GetClientTeam(client);
   350  
   351 /**
   352  * Sets a client's AdminId.  
   353  *
   354  * @param client		Player's index.
   355  * @param id			AdminId to set.  INVALID_ADMIN_ID removes admin permissions.
   356  * @param temp			True if the id should be freed on disconnect.
   357  * @noreturn
   358  * @error				Invalid client index, client not connected, or bogus AdminId.
   359  */
   360 native SetUserAdmin(client, AdminId:id, bool:temp=false);
   361 
   362 /**
   363  * Retrieves a client's AdminId.
   364  *
   365  * @param client		Player's index.
   366  * @return				AdminId of the client, or INVALID_ADMIN_ID if none.
   367  * @error				Invalid client index, or client not connected.
   368  */
   369 native AdminId:GetUserAdmin(client);
   370 
   371 /**
   372  * Sets access flags on a client.  If the client is not an admin,
   373  * a temporary, anonymous AdminId is given.
   374  *
   375  * @param client		Player's index.
   376  * @param ...			Flags to set on the client.
   377  * @noreturn
   378  * @error				Invalid client index, or client not connected.
   379  */
   380 native AddUserFlags(client, AdminFlag:...);
   381 
   382 /**
   383  * Removes flags from a client.  If the client is not an admin,
   384  * this has no effect.
   385  *
   386  * @param client		Player's index.
   387  * @param ...			Flags to remove from the client.
   388  * @noreturn
   389  * @error				Invalid client index, or client not connected.
   390  */
   391 native RemoveUserFlags(client, AdminFlag:...);
   392 
   393 /** 
   394  * Sets access flags on a client using bits instead of flags.  If the
   395  * client is not an admin, and flags not 0, a temporary, anonymous AdminId is given.
   396  *
   397  * @param client		Player's index.
   398  * @param flags			Bitstring of flags to set on client.
   399  * @noreturn
   400  */
   401 native SetUserFlagBits(client, flags);
   402 
   403 /**
   404  * Returns client access flags.  If the client is not an admin,
   405  * the result is always 0.
   406  * 
   407  * @param client		Player's index.
   408  * @return				Flags
   409  * @error				Invalid client index, or client not connected.
   410  */
   411 native GetUserFlagBits(client);
   412 
   413 /**
   414  * Returns whether a user can target another user.
   415  * This is a helper function for CanAdminTarget.
   416  *
   417  * @param client		Player's index.
   418  * @param target		Target player's index.
   419  * @return				True if target is targettable by the player, false otherwise.
   420  * @error				Invalid or unconnected player indexers.
   421  */
   422 native bool:CanUserTarget(client, target);
   423 
   424 /**
   425  * Runs through the Core-defined admin authorization checks on a player.
   426  * Has no effect if the player is already an admin.
   427  *
   428  * Note: This function is based on the internal cache only.
   429  *
   430  * @param client		Client index.
   431  * @return				True if access was changed, false if it did not.
   432  * @error				Invalid client index or client not in-game AND authorized.
   433  */
   434 native bool:RunAdminCacheChecks(client);
   435 
   436 /**
   437  * Signals that a player has completed post-connection admin checks.
   438  * Has no effect if the player has already had this event signalled.
   439  *
   440  * Note: This must be sent even if no admin id was assigned.
   441  *
   442  * @param client		Client index.
   443  * @noreturn
   444  * @error				Invalid client index or client not in-game AND authorized.
   445  */
   446 native NotifyPostAdminCheck(client);
   447 
   448 /** 
   449  * Creates a fake client.
   450  *
   451  * @param name			Name to use.
   452  * @return				Client index on success, 0 otherwise.
   453  */
   454 native CreateFakeClient(const String:name[]);
   455 
   456 /**
   457  * Sets a convar value on a fake client.
   458  *
   459  * @param client		Client index.
   460  * @param cvar			ConVar name.
   461  * @param value			ConVar value.
   462  * @noreturn
   463  * @error				Invalid client index, client not connected,
   464  *						or client not a fake client.
   465  */
   466 native SetFakeClientConVar(client, const String:cvar[], const String:value[]);
   467 
   468 /**
   469  * Returns the client's health.
   470  *
   471  * @param client		Player's index.
   472  * @return				Health value.
   473  * @error				Invalid client index, client not in game, or no mod support.
   474  */
   475 native GetClientHealth(client);
   476 
   477 /**
   478  * Returns the client's model name.
   479  *
   480  * @param client		Player's index.
   481  * @param model			Buffer to store the client's model name.
   482  * @param maxlen		Maximum length of string buffer (includes NULL terminator).
   483  * @noreturn
   484  * @error				Invalid client index, client not in game, or no mod support.
   485  */
   486 native GetClientModel(client, String:model[], maxlen);
   487 
   488 /**
   489  * Returns the client's weapon name.
   490  *
   491  * @param client		Player's index.
   492  * @param weapon		Buffer to store the client's weapon name.
   493  * @param maxlen		Maximum length of string buffer (includes NULL terminator).
   494  * @noreturn
   495  * @error				Invalid client index, client not in game, or no mod support.
   496  */
   497 native GetClientWeapon(client, String:weapon[], maxlen);
   498 
   499 /**
   500  * Returns the client's max size vector.
   501  *
   502  * @param client		Player's index.
   503  * @param vec			Destination vector to store the client's max size.
   504  * @noreturn
   505  * @error				Invalid client index, client not in game, or no mod support.
   506  */
   507 native GetClientMaxs(client, Float:vec[3]);
   508 
   509 /**
   510  * Returns the client's min size vector.
   511  *
   512  * @param client		Player's index.
   513  * @param vec			Destination vector to store the client's min size.
   514  * @noreturn
   515  * @error				Invalid client index, client not in game, or no mod support.
   516  */
   517 native GetClientMins(client, Float:vec[3]);
   518 
   519 /**
   520  * Returns the client's position angle.
   521  *
   522  * @param client		Player's index.
   523  * @param ang			Destination vector to store the client's position angle.
   524  * @noreturn
   525  * @error				Invalid client index, client not in game, or no mod support.
   526  */
   527 native GetClientAbsAngles(client, Float:ang[3]);
   528 
   529 /**
   530  * Returns the client's origin vector.
   531  *
   532  * @param client		Player's index.
   533  * @param vec			Destination vector to store the client's origin vector.
   534  * @noreturn
   535  * @error				Invalid client index, client not in game, or no mod support.
   536  */
   537 native GetClientAbsOrigin(client, Float:vec[3]);
   538 
   539 /**
   540  * Returns the client's armor.
   541  *
   542  * @param client		Player's index.
   543  * @return				Armor value.
   544  * @error				Invalid client index, client not in game, or no mod support.
   545  */
   546 native GetClientArmor(client);
   547 
   548 /**
   549  * Returns the client's death count.
   550  *
   551  * @param client		Player's index.
   552  * @return				Death count.
   553  * @error				Invalid client index, client not in game, or no mod support.
   554  */
   555 native GetClientDeaths(client);
   556 
   557 /**
   558  * Returns the client's frag count.
   559  *
   560  * @param client		Player's index.
   561  * @return				Frag count.
   562  * @error				Invalid client index, client not in game, or no mod support.
   563  */
   564 native GetClientFrags(client);
   565 
   566 /**
   567  * Returns the client's send data rate in bytes/sec.
   568  *
   569  * @param client		Player's index.
   570  * @return				Data rate.
   571  * @error				Invalid client index, client not in game, or fake client.
   572  */
   573 native GetClientDataRate(client);
   574 
   575 /**
   576  * Returns if a client is timing out
   577  *
   578  * @param client		Player's index.
   579  * @return				True if client is timing out, false otherwise.
   580  * @error				Invalid client index, client not in game, or fake client.
   581  */
   582 native bool:IsClientTimingOut(client);
   583 
   584 /**
   585  * Returns the client's connection time in seconds.
   586  *
   587  * @param client		Player's index.
   588  * @return				Connection time.
   589  * @error				Invalid client index, client not in game, or fake client.
   590  */
   591 native Float:GetClientTime(client);
   592 
   593 /**
   594  * Returns the client's current latency (RTT), more accurate than GetAvgLatency but jittering.
   595  *
   596  * @param client		Player's index.
   597  * @param flow			Traffic flowing direction.
   598  * @return				Latency.
   599  * @error				Invalid client index, client not in game, or fake client.
   600  */
   601 native Float:GetClientLatency(client, NetFlow:flow);
   602 
   603 /**
   604  * Returns the client's average packet latency in seconds.
   605  *
   606  * @param client		Player's index.
   607  * @param flow			Traffic flowing direction.
   608  * @return				Average latency.
   609  * @error				Invalid client index, client not in game, or fake client.
   610  */
   611 native Float:GetClientAvgLatency(client, NetFlow:flow);
   612 
   613 /**
   614  * Returns the client's average packet loss, values go from 0 to 1 (for percentages).
   615  *
   616  * @param client		Player's index.
   617  * @param flow			Traffic flowing direction.
   618  * @return				Average packet loss.
   619  * @error				Invalid client index, client not in game, or fake client.
   620  */
   621 native Float:GetClientAvgLoss(client, NetFlow:flow);
   622 
   623 /**
   624  * Returns the client's average packet choke, values go from 0 to 1 (for percentages).
   625  *
   626  * @param client		Player's index.
   627  * @param flow			Traffic flowing direction.
   628  * @return				Average packet choke.
   629  * @error				Invalid client index, client not in game, or fake client.
   630  */
   631 native Float:GetClientAvgChoke(client, NetFlow:flow);
   632 
   633 /**
   634  * Returns the client's data flow in bytes/sec.
   635  *
   636  * @param client		Player's index.
   637  * @param flow			Traffic flowing direction.
   638  * @return				Data flow.
   639  * @error				Invalid client index, client not in game, or fake client.
   640  */
   641 native Float:GetClientAvgData(client, NetFlow:flow);
   642 
   643 /**
   644  * Returns the client's average packet frequency in packets/sec.
   645  *
   646  * @param client		Player's index.
   647  * @param flow			Traffic flowing direction.
   648  * @return				Packet frequency.
   649  * @error				Invalid client index, client not in game, or fake client.
   650  */
   651 native Float:GetClientAvgPackets(client, NetFlow:flow);
   652 
   653 /**
   654  * Translates an userid index to the real player index.
   655  *
   656  * @param userid		Userid value.
   657  * @return				Client value.
   658  * @error				Returns 0 if invalid userid.
   659  */
   660 native GetClientOfUserId(userid);
   661 
   662 /**
   663  * Disconnects a client from the server as soon as the next frame starts.
   664  *
   665  * Note: Originally, KickClient() was immediate.  The delay was introduced 
   666  * because despite warnings, plugins were using it in ways that would crash. 
   667  * The new safe version can break cases that rely on immediate disconnects, 
   668  * but ensures that plugins do not accidentally cause crashes.
   669  *
   670  * If you need immediate disconnects, use KickClientEx().
   671  *
   672  * Note: IsClientInKickQueue() will return true before the kick occurs.
   673  *
   674  * @param client		Client index.
   675  * @param format		Optional formatting rules for disconnect reason.
   676  *                      Note that a period is automatically appended to the string by the engine.
   677  * @param ...			Variable number of format parameters.
   678  * @noreturn
   679  * @error				Invalid client index, or client not connected.
   680  */
   681 native KickClient(client, const String:format[]="", any:...);
   682 
   683 /**
   684  * Immediately disconnects a client from the server.
   685  *
   686  * Kicking clients from certain events or callbacks may cause crashes.  If in 
   687  * doubt, create a short (0.1 second) timer to kick the client in the next 
   688  * available frame.
   689  *
   690  * @param client		Client index.
   691  * @param format		Optional formatting rules for disconnect reason.
   692  *                      Note that a period is automatically appended to the string by the engine.
   693  * @param ...			Variable number of format parameters.
   694  * @noreturn
   695  * @error				Invalid client index, or client not connected.
   696  */
   697 native KickClientEx(client, const String:format[]="", any:...);
   698 
   699 /**
   700  * Changes a client's team through the mod's generic team changing function.
   701  * On CS:S, this will kill the player.
   702  *
   703  * @param client		Client index.
   704  * @param team			Mod-specific team index.
   705  * @noreturn
   706  * @error				Invalid client index, client not connected, or lack of 
   707  *						mod support.
   708  */
   709 native ChangeClientTeam(client, team);
   710 
   711 /**
   712  * Returns the clients unique serial identifier.
   713  *
   714  * @return	Serial number.
   715  */
   716 native GetClientSerial(client);
   717 
   718 /**
   719  * Returns the client index by its serial number.
   720  *
   721  * @return				Client index, or 0 for invalid serial.
   722  */
   723 native GetClientFromSerial(serial);
   724