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