committed by
Nicholas Hastings
parent
7451257578
commit
f91d659c6f
+69
-94
@@ -72,7 +72,7 @@ enum AuthIdType
|
||||
#define MAXPLAYERS 65 /**< Maximum number of players SourceMod supports */
|
||||
#define MAX_NAME_LENGTH 32 /**< Maximum buffer required to store a client name */
|
||||
|
||||
public const MaxClients; /**< Maximum number of players the server supports (dynamic) */
|
||||
public const int MaxClients; /**< Maximum number of players the server supports (dynamic) */
|
||||
|
||||
/**
|
||||
* Called on client connection. If you return true, the client will be allowed in the server.
|
||||
@@ -88,15 +88,14 @@ public const MaxClients; /**< Maximum number of players the server supports (dyn
|
||||
* @param maxlen Maximum number of characters for rejection buffer.
|
||||
* @return True to validate client's connection, false to refuse it.
|
||||
*/
|
||||
forward bool:OnClientConnect(client, String:rejectmsg[], maxlen);
|
||||
forward bool OnClientConnect(int client, char[] rejectmsg, int maxlen);
|
||||
|
||||
/**
|
||||
* Called once a client successfully connects. This callback is paired with OnClientDisconnect.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward void OnClientConnected(client);
|
||||
forward void OnClientConnected(int client);
|
||||
|
||||
/**
|
||||
* Called when a client is entering the game.
|
||||
@@ -110,25 +109,22 @@ forward void OnClientConnected(client);
|
||||
* function, as clients are already in game at this point.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward void OnClientPutInServer(client);
|
||||
forward void OnClientPutInServer(int client);
|
||||
|
||||
/**
|
||||
* Called when a client is disconnecting from the server.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward void OnClientDisconnect(client);
|
||||
forward void OnClientDisconnect(int client);
|
||||
|
||||
/**
|
||||
* Called when a client is disconnected from the server.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward void OnClientDisconnect_Post(client);
|
||||
forward void OnClientDisconnect_Post(int client);
|
||||
|
||||
/**
|
||||
* Called when a client is sending a command.
|
||||
@@ -141,7 +137,7 @@ forward void OnClientDisconnect_Post(client);
|
||||
* @return Plugin_Handled blocks the command from being sent,
|
||||
* and Plugin_Continue resumes normal functionality.
|
||||
*/
|
||||
forward Action:OnClientCommand(client, args);
|
||||
forward Action OnClientCommand(int client, int args);
|
||||
|
||||
/**
|
||||
* Called when a client is sending a KeyValues command.
|
||||
@@ -162,7 +158,6 @@ forward Action OnClientCommandKeyValues(int client, KeyValues kv);
|
||||
* @param kv KeyValues data sent as the command.
|
||||
* (This handle should not be stored and will be closed
|
||||
* after this forward completes.)
|
||||
* @noreturn
|
||||
*/
|
||||
forward void OnClientCommandKeyValues_Post(int client, KeyValues kv);
|
||||
|
||||
@@ -170,9 +165,8 @@ forward void OnClientCommandKeyValues_Post(int client, KeyValues kv);
|
||||
* Called whenever the client's settings are changed.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward void OnClientSettingsChanged(client);
|
||||
forward void OnClientSettingsChanged(int client);
|
||||
|
||||
/**
|
||||
* Called when a client receives an auth ID. The state of a client's
|
||||
@@ -183,9 +177,8 @@ forward void OnClientSettingsChanged(client);
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param auth Client Steam2 id, if available, else engine auth id.
|
||||
* @noreturn
|
||||
*/
|
||||
forward void OnClientAuthorized(client, const String:auth[]);
|
||||
forward void OnClientAuthorized(int client, const char[] auth);
|
||||
|
||||
/**
|
||||
* Called once a client is authorized and fully in-game, but
|
||||
@@ -203,7 +196,7 @@ forward void OnClientAuthorized(client, const String:auth[]);
|
||||
* @param client Client index.
|
||||
* @return Plugin_Handled to block admin checks.
|
||||
*/
|
||||
forward Action:OnClientPreAdminCheck(client);
|
||||
forward Action OnClientPreAdminCheck(int client);
|
||||
|
||||
/**
|
||||
* Called directly before OnClientPostAdminCheck() as a method to
|
||||
@@ -218,9 +211,8 @@ forward Action:OnClientPreAdminCheck(client);
|
||||
* See OnClientPostAdminCheck() for more information.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward void OnClientPostAdminFilter(client);
|
||||
forward void OnClientPostAdminFilter(int client);
|
||||
|
||||
/**
|
||||
* Called once a client is authorized and fully in-game, and
|
||||
@@ -230,9 +222,8 @@ forward void OnClientPostAdminFilter(client);
|
||||
* after each OnClientPutInServer() call.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward void OnClientPostAdminCheck(client);
|
||||
forward void OnClientPostAdminCheck(int client);
|
||||
|
||||
/**
|
||||
* This function will be deprecated in a future release. Use the MaxClients variable instead.
|
||||
@@ -247,7 +238,7 @@ forward void OnClientPostAdminCheck(client);
|
||||
*
|
||||
* @return Maximum number of clients allowed.
|
||||
*/
|
||||
native GetMaxClients();
|
||||
native int GetMaxClients();
|
||||
|
||||
/**
|
||||
* Returns the maximum number of human players allowed on the server. This is
|
||||
@@ -262,7 +253,7 @@ native GetMaxClients();
|
||||
*
|
||||
* @return Maximum number of humans allowed.
|
||||
*/
|
||||
native GetMaxHumanPlayers();
|
||||
native int GetMaxHumanPlayers();
|
||||
|
||||
/**
|
||||
* Returns the client count put in the server.
|
||||
@@ -270,7 +261,7 @@ native GetMaxHumanPlayers();
|
||||
* @param inGameOnly If false connecting players are also counted.
|
||||
* @return Client count in the server.
|
||||
*/
|
||||
native GetClientCount(bool:inGameOnly=true);
|
||||
native int GetClientCount(bool inGameOnly=true);
|
||||
|
||||
/**
|
||||
* Returns the client's name.
|
||||
@@ -281,7 +272,7 @@ native GetClientCount(bool:inGameOnly=true);
|
||||
* @return True on success, false otherwise.
|
||||
* @error If the client is not connected an error will be thrown.
|
||||
*/
|
||||
native bool:GetClientName(client, String:name[], maxlen);
|
||||
native bool GetClientName(int client, char[] name, int maxlen);
|
||||
|
||||
/**
|
||||
* Retrieves a client's IP address.
|
||||
@@ -293,7 +284,7 @@ native bool:GetClientName(client, String:name[], maxlen);
|
||||
* @return True on success, false otherwise.
|
||||
* @error If the client is not connected or the index is invalid.
|
||||
*/
|
||||
native bool:GetClientIP(client, String:ip[], maxlen, bool:remport=true);
|
||||
native bool GetClientIP(int client, char[] ip, int maxlen, bool remport=true);
|
||||
|
||||
/**
|
||||
* Retrieves a client's authentication string (SteamID).
|
||||
@@ -308,7 +299,7 @@ native bool:GetClientIP(client, String:ip[], maxlen, bool:remport=true);
|
||||
* @error If the client is not connected or the index is invalid.
|
||||
*/
|
||||
#pragma deprecated Use GetClientAuthId
|
||||
native bool:GetClientAuthString(client, String:auth[], maxlen, bool:validate=true);
|
||||
native bool GetClientAuthString(int client, char[] auth, int maxlen, bool validate=true);
|
||||
|
||||
/**
|
||||
* Retrieves a client's authentication string (SteamID).
|
||||
@@ -323,7 +314,7 @@ native bool:GetClientAuthString(client, String:auth[], maxlen, bool:validate=tru
|
||||
* @return True on success, false otherwise.
|
||||
* @error If the client is not connected or the index is invalid.
|
||||
*/
|
||||
native bool:GetClientAuthId(client, AuthIdType:authType, String:auth[], maxlen, bool:validate=true);
|
||||
native bool GetClientAuthId(int client, AuthIdType authType, char[] auth, int maxlen, bool validate=true);
|
||||
|
||||
/**
|
||||
* Returns the client's Steam account ID.
|
||||
@@ -335,7 +326,7 @@ native bool:GetClientAuthId(client, AuthIdType:authType, String:auth[], maxlen,
|
||||
* @return Steam account ID or 0 if not available.
|
||||
* @error If the client is not connected or the index is invalid.
|
||||
*/
|
||||
native GetSteamAccountID(client, bool:validate=true);
|
||||
native int GetSteamAccountID(int client, bool validate=true);
|
||||
|
||||
/**
|
||||
* Retrieves a client's user id, which is an index incremented for every client
|
||||
@@ -345,7 +336,7 @@ native GetSteamAccountID(client, bool:validate=true);
|
||||
* @return User id of the client.
|
||||
* @error If the client is not connected or the index is invalid.
|
||||
*/
|
||||
native GetClientUserId(client);
|
||||
native int GetClientUserId(int client);
|
||||
|
||||
/**
|
||||
* Returns if a certain player is connected.
|
||||
@@ -353,7 +344,7 @@ native GetClientUserId(client);
|
||||
* @param client Player index.
|
||||
* @return True if player is connected to the server, false otherwise.
|
||||
*/
|
||||
native bool:IsClientConnected(client);
|
||||
native bool IsClientConnected(int client);
|
||||
|
||||
/**
|
||||
* Returns if a certain player has entered the game.
|
||||
@@ -362,7 +353,7 @@ native bool:IsClientConnected(client);
|
||||
* @return True if player has entered the game, false otherwise.
|
||||
* @error Invalid client index.
|
||||
*/
|
||||
native bool:IsClientInGame(client);
|
||||
native bool IsClientInGame(int client);
|
||||
|
||||
/**
|
||||
* Returns if a client is in the "kick queue" (i.e. the client will be kicked
|
||||
@@ -372,14 +363,14 @@ native bool:IsClientInGame(client);
|
||||
* @return True if in the kick queue, false otherwise.
|
||||
* @error Invalid client index.
|
||||
*/
|
||||
native bool:IsClientInKickQueue(client);
|
||||
native bool IsClientInKickQueue(int client);
|
||||
|
||||
/**
|
||||
* Backwards compatibility stock - use IsClientInGame
|
||||
* @deprecated Renamed to IsClientInGame
|
||||
*/
|
||||
#pragma deprecated Use IsClientInGame() instead
|
||||
stock bool:IsPlayerInGame(client)
|
||||
stock bool IsPlayerInGame(int client)
|
||||
{
|
||||
return IsClientInGame(client);
|
||||
}
|
||||
@@ -390,7 +381,7 @@ stock bool:IsPlayerInGame(client)
|
||||
* @param client Player index.
|
||||
* @return True if player has been authenticated, false otherwise.
|
||||
*/
|
||||
native bool:IsClientAuthorized(client);
|
||||
native bool IsClientAuthorized(int client);
|
||||
|
||||
/**
|
||||
* Returns if a certain player is a fake client.
|
||||
@@ -398,7 +389,7 @@ native bool:IsClientAuthorized(client);
|
||||
* @param client Player index.
|
||||
* @return True if player is a fake client, false otherwise.
|
||||
*/
|
||||
native bool:IsFakeClient(client);
|
||||
native bool IsFakeClient(int client);
|
||||
|
||||
/**
|
||||
* Returns if a certain player is the SourceTV bot.
|
||||
@@ -406,7 +397,7 @@ native bool:IsFakeClient(client);
|
||||
* @param client Player index.
|
||||
* @return True if player is the SourceTV bot, false otherwise.
|
||||
*/
|
||||
native bool:IsClientSourceTV(client);
|
||||
native bool IsClientSourceTV(int client);
|
||||
|
||||
/**
|
||||
* Returns if a certain player is the Replay bot.
|
||||
@@ -414,7 +405,7 @@ native bool:IsClientSourceTV(client);
|
||||
* @param client Player index.
|
||||
* @return True if player is the Replay bot, false otherwise.
|
||||
*/
|
||||
native bool:IsClientReplay(client);
|
||||
native bool IsClientReplay(int client);
|
||||
|
||||
/**
|
||||
* Returns if a certain player is an observer/spectator.
|
||||
@@ -422,7 +413,7 @@ native bool:IsClientReplay(client);
|
||||
* @param client Player index.
|
||||
* @return True if player is an observer, false otherwise.
|
||||
*/
|
||||
native bool:IsClientObserver(client);
|
||||
native bool IsClientObserver(int client);
|
||||
|
||||
/**
|
||||
* Returns if the client is alive or dead.
|
||||
@@ -433,7 +424,7 @@ native bool:IsClientObserver(client);
|
||||
* @return True if the client is alive, false otherwise.
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native bool:IsPlayerAlive(client);
|
||||
native bool IsPlayerAlive(int client);
|
||||
|
||||
/**
|
||||
* Retrieves values from client replicated keys.
|
||||
@@ -445,7 +436,7 @@ native bool:IsPlayerAlive(client);
|
||||
* @return True on success, false otherwise.
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
native bool:GetClientInfo(client, const String:key[], String:value[], maxlen);
|
||||
native bool GetClientInfo(int client, const char[] key, char[] value, int maxlen);
|
||||
|
||||
/**
|
||||
* Retrieves a client's team index.
|
||||
@@ -454,7 +445,7 @@ native bool:GetClientInfo(client, const String:key[], String:value[], maxlen);
|
||||
* @return Team index the client is on (mod specific).
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native GetClientTeam(client);
|
||||
native int GetClientTeam(int client);
|
||||
|
||||
/**
|
||||
* Sets a client's AdminId.
|
||||
@@ -462,10 +453,9 @@ native GetClientTeam(client);
|
||||
* @param client Player's index.
|
||||
* @param id AdminId to set. INVALID_ADMIN_ID removes admin permissions.
|
||||
* @param temp True if the id should be freed on disconnect.
|
||||
* @noreturn
|
||||
* @error Invalid client index, client not connected, or bogus AdminId.
|
||||
*/
|
||||
native SetUserAdmin(client, AdminId:id, bool:temp=false);
|
||||
native void SetUserAdmin(int client, AdminId id, bool temp=false);
|
||||
|
||||
/**
|
||||
* Retrieves a client's AdminId.
|
||||
@@ -474,7 +464,7 @@ native SetUserAdmin(client, AdminId:id, bool:temp=false);
|
||||
* @return AdminId of the client, or INVALID_ADMIN_ID if none.
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
native AdminId:GetUserAdmin(client);
|
||||
native AdminId GetUserAdmin(int client);
|
||||
|
||||
/**
|
||||
* Sets access flags on a client. If the client is not an admin,
|
||||
@@ -482,10 +472,9 @@ native AdminId:GetUserAdmin(client);
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param ... Flags to set on the client.
|
||||
* @noreturn
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
native AddUserFlags(client, AdminFlag:...);
|
||||
native void AddUserFlags(int client, AdminFlag ...);
|
||||
|
||||
/**
|
||||
* Removes flags from a client. If the client is not an admin,
|
||||
@@ -493,10 +482,9 @@ native AddUserFlags(client, AdminFlag:...);
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param ... Flags to remove from the client.
|
||||
* @noreturn
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
native RemoveUserFlags(client, AdminFlag:...);
|
||||
native void RemoveUserFlags(int client, AdminFlag ...);
|
||||
|
||||
/**
|
||||
* Sets access flags on a client using bits instead of flags. If the
|
||||
@@ -504,9 +492,8 @@ native RemoveUserFlags(client, AdminFlag:...);
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param flags Bitstring of flags to set on client.
|
||||
* @noreturn
|
||||
*/
|
||||
native SetUserFlagBits(client, flags);
|
||||
native void SetUserFlagBits(int client, int flags);
|
||||
|
||||
/**
|
||||
* Returns client access flags. If the client is not an admin,
|
||||
@@ -516,7 +503,7 @@ native SetUserFlagBits(client, flags);
|
||||
* @return Flags
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
native GetUserFlagBits(client);
|
||||
native int GetUserFlagBits(int client);
|
||||
|
||||
/**
|
||||
* Returns whether a user can target another user.
|
||||
@@ -527,7 +514,7 @@ native GetUserFlagBits(client);
|
||||
* @return True if target is targettable by the player, false otherwise.
|
||||
* @error Invalid or unconnected player indexers.
|
||||
*/
|
||||
native bool:CanUserTarget(client, target);
|
||||
native bool CanUserTarget(int client, int target);
|
||||
|
||||
/**
|
||||
* Runs through the Core-defined admin authorization checks on a player.
|
||||
@@ -539,7 +526,7 @@ native bool:CanUserTarget(client, target);
|
||||
* @return True if access was changed, false if it did not.
|
||||
* @error Invalid client index or client not in-game AND authorized.
|
||||
*/
|
||||
native bool:RunAdminCacheChecks(client);
|
||||
native bool RunAdminCacheChecks(int client);
|
||||
|
||||
/**
|
||||
* Signals that a player has completed post-connection admin checks.
|
||||
@@ -548,10 +535,9 @@ native bool:RunAdminCacheChecks(client);
|
||||
* Note: This must be sent even if no admin id was assigned.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
* @error Invalid client index or client not in-game AND authorized.
|
||||
*/
|
||||
native NotifyPostAdminCheck(client);
|
||||
native void NotifyPostAdminCheck(int client);
|
||||
|
||||
/**
|
||||
* Creates a fake client.
|
||||
@@ -559,7 +545,7 @@ native NotifyPostAdminCheck(client);
|
||||
* @param name Name to use.
|
||||
* @return Client index on success, 0 otherwise.
|
||||
*/
|
||||
native CreateFakeClient(const String:name[]);
|
||||
native int CreateFakeClient(const char[] name);
|
||||
|
||||
/**
|
||||
* Sets a convar value on a fake client.
|
||||
@@ -567,11 +553,10 @@ native CreateFakeClient(const String:name[]);
|
||||
* @param client Client index.
|
||||
* @param cvar ConVar name.
|
||||
* @param value ConVar value.
|
||||
* @noreturn
|
||||
* @error Invalid client index, client not connected,
|
||||
* or client not a fake client.
|
||||
*/
|
||||
native SetFakeClientConVar(client, const String:cvar[], const String:value[]);
|
||||
native void SetFakeClientConVar(int client, const char[] cvar, const char[] value);
|
||||
|
||||
/**
|
||||
* Returns the client's health.
|
||||
@@ -580,7 +565,7 @@ native SetFakeClientConVar(client, const String:cvar[], const String:value[]);
|
||||
* @return Health value.
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native GetClientHealth(client);
|
||||
native int GetClientHealth(int client);
|
||||
|
||||
/**
|
||||
* Returns the client's model name.
|
||||
@@ -588,10 +573,9 @@ native GetClientHealth(client);
|
||||
* @param client Player's index.
|
||||
* @param model Buffer to store the client's model name.
|
||||
* @param maxlen Maximum length of string buffer (includes NULL terminator).
|
||||
* @noreturn
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native GetClientModel(client, String:model[], maxlen);
|
||||
native void GetClientModel(int client, char[] model, int maxlen);
|
||||
|
||||
/**
|
||||
* Returns the client's weapon name.
|
||||
@@ -599,50 +583,45 @@ native GetClientModel(client, String:model[], maxlen);
|
||||
* @param client Player's index.
|
||||
* @param weapon Buffer to store the client's weapon name.
|
||||
* @param maxlen Maximum length of string buffer (includes NULL terminator).
|
||||
* @noreturn
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native GetClientWeapon(client, String:weapon[], maxlen);
|
||||
native void GetClientWeapon(int client, char[] weapon, int maxlen);
|
||||
|
||||
/**
|
||||
* Returns the client's max size vector.
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param vec Destination vector to store the client's max size.
|
||||
* @noreturn
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native GetClientMaxs(client, Float:vec[3]);
|
||||
native void GetClientMaxs(int client, float vec[3]);
|
||||
|
||||
/**
|
||||
* Returns the client's min size vector.
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param vec Destination vector to store the client's min size.
|
||||
* @noreturn
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native GetClientMins(client, Float:vec[3]);
|
||||
native void GetClientMins(int client, float vec[3]);
|
||||
|
||||
/**
|
||||
* Returns the client's position angle.
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param ang Destination vector to store the client's position angle.
|
||||
* @noreturn
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native GetClientAbsAngles(client, Float:ang[3]);
|
||||
native void GetClientAbsAngles(int client, float ang[3]);
|
||||
|
||||
/**
|
||||
* Returns the client's origin vector.
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param vec Destination vector to store the client's origin vector.
|
||||
* @noreturn
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native GetClientAbsOrigin(client, Float:vec[3]);
|
||||
native void GetClientAbsOrigin(int client, float vec[3]);
|
||||
|
||||
/**
|
||||
* Returns the client's armor.
|
||||
@@ -651,7 +630,7 @@ native GetClientAbsOrigin(client, Float:vec[3]);
|
||||
* @return Armor value.
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native GetClientArmor(client);
|
||||
native int GetClientArmor(int client);
|
||||
|
||||
/**
|
||||
* Returns the client's death count.
|
||||
@@ -660,7 +639,7 @@ native GetClientArmor(client);
|
||||
* @return Death count.
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native GetClientDeaths(client);
|
||||
native int GetClientDeaths(int client);
|
||||
|
||||
/**
|
||||
* Returns the client's frag count.
|
||||
@@ -669,7 +648,7 @@ native GetClientDeaths(client);
|
||||
* @return Frag count.
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native GetClientFrags(client);
|
||||
native int GetClientFrags(int client);
|
||||
|
||||
/**
|
||||
* Returns the client's send data rate in bytes/sec.
|
||||
@@ -678,7 +657,7 @@ native GetClientFrags(client);
|
||||
* @return Data rate.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native GetClientDataRate(client);
|
||||
native int GetClientDataRate(int client);
|
||||
|
||||
/**
|
||||
* Returns if a client is timing out
|
||||
@@ -687,7 +666,7 @@ native GetClientDataRate(client);
|
||||
* @return True if client is timing out, false otherwise.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native bool:IsClientTimingOut(client);
|
||||
native bool IsClientTimingOut(int client);
|
||||
|
||||
/**
|
||||
* Returns the client's connection time in seconds.
|
||||
@@ -696,7 +675,7 @@ native bool:IsClientTimingOut(client);
|
||||
* @return Connection time.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native Float:GetClientTime(client);
|
||||
native float GetClientTime(int client);
|
||||
|
||||
/**
|
||||
* Returns the client's current latency (RTT), more accurate than GetAvgLatency but jittering.
|
||||
@@ -706,7 +685,7 @@ native Float:GetClientTime(client);
|
||||
* @return Latency, or -1 if network info is not available.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native Float:GetClientLatency(client, NetFlow:flow);
|
||||
native float GetClientLatency(int client, NetFlow flow);
|
||||
|
||||
/**
|
||||
* Returns the client's average packet latency in seconds.
|
||||
@@ -716,7 +695,7 @@ native Float:GetClientLatency(client, NetFlow:flow);
|
||||
* @return Latency, or -1 if network info is not available.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native Float:GetClientAvgLatency(client, NetFlow:flow);
|
||||
native float GetClientAvgLatency(int client, NetFlow flow);
|
||||
|
||||
/**
|
||||
* Returns the client's average packet loss, values go from 0 to 1 (for percentages).
|
||||
@@ -726,7 +705,7 @@ native Float:GetClientAvgLatency(client, NetFlow:flow);
|
||||
* @return Average packet loss, or -1 if network info is not available.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native Float:GetClientAvgLoss(client, NetFlow:flow);
|
||||
native float GetClientAvgLoss(int client, NetFlow flow);
|
||||
|
||||
/**
|
||||
* Returns the client's average packet choke, values go from 0 to 1 (for percentages).
|
||||
@@ -736,7 +715,7 @@ native Float:GetClientAvgLoss(client, NetFlow:flow);
|
||||
* @return Average packet loss, or -1 if network info is not available.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native Float:GetClientAvgChoke(client, NetFlow:flow);
|
||||
native float GetClientAvgChoke(int client, NetFlow flow);
|
||||
|
||||
/**
|
||||
* Returns the client's data flow in bytes/sec.
|
||||
@@ -746,7 +725,7 @@ native Float:GetClientAvgChoke(client, NetFlow:flow);
|
||||
* @return Data flow.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native Float:GetClientAvgData(client, NetFlow:flow);
|
||||
native float GetClientAvgData(int client, NetFlow flow);
|
||||
|
||||
/**
|
||||
* Returns the client's average packet frequency in packets/sec.
|
||||
@@ -756,7 +735,7 @@ native Float:GetClientAvgData(client, NetFlow:flow);
|
||||
* @return Packet frequency.
|
||||
* @error Invalid client index, client not connected, or fake client.
|
||||
*/
|
||||
native Float:GetClientAvgPackets(client, NetFlow:flow);
|
||||
native float GetClientAvgPackets(int client, NetFlow flow);
|
||||
|
||||
/**
|
||||
* Translates an userid index to the real player index.
|
||||
@@ -765,7 +744,7 @@ native Float:GetClientAvgPackets(client, NetFlow:flow);
|
||||
* @return Client value.
|
||||
* @error Returns 0 if invalid userid.
|
||||
*/
|
||||
native GetClientOfUserId(userid);
|
||||
native int GetClientOfUserId(int userid);
|
||||
|
||||
/**
|
||||
* Disconnects a client from the server as soon as the next frame starts.
|
||||
@@ -783,10 +762,9 @@ native GetClientOfUserId(userid);
|
||||
* @param format Optional formatting rules for disconnect reason.
|
||||
* Note that a period is automatically appended to the string by the engine.
|
||||
* @param ... Variable number of format parameters.
|
||||
* @noreturn
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
native KickClient(client, const String:format[]="", any:...);
|
||||
native void KickClient(int client, const char[] format="", any ...);
|
||||
|
||||
/**
|
||||
* Immediately disconnects a client from the server.
|
||||
@@ -799,10 +777,9 @@ native KickClient(client, const String:format[]="", any:...);
|
||||
* @param format Optional formatting rules for disconnect reason.
|
||||
* Note that a period is automatically appended to the string by the engine.
|
||||
* @param ... Variable number of format parameters.
|
||||
* @noreturn
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
native KickClientEx(client, const String:format[]="", any:...);
|
||||
native void KickClientEx(int client, const char[] format="", any ...);
|
||||
|
||||
/**
|
||||
* Changes a client's team through the mod's generic team changing function.
|
||||
@@ -810,11 +787,10 @@ native KickClientEx(client, const String:format[]="", any:...);
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param team Mod-specific team index.
|
||||
* @noreturn
|
||||
* @error Invalid client index, client not connected, or lack of
|
||||
* mod support.
|
||||
*/
|
||||
native ChangeClientTeam(client, team);
|
||||
native void ChangeClientTeam(int client, int team);
|
||||
|
||||
/**
|
||||
* Returns the clients unique serial identifier.
|
||||
@@ -823,7 +799,7 @@ native ChangeClientTeam(client, team);
|
||||
* @return Serial number.
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
native GetClientSerial(client);
|
||||
native int GetClientSerial(int client);
|
||||
|
||||
/**
|
||||
* Returns the client index by its serial number.
|
||||
@@ -831,5 +807,4 @@ native GetClientSerial(client);
|
||||
* @param serial Serial number.
|
||||
* @return Client index, or 0 for invalid serial.
|
||||
*/
|
||||
native GetClientFromSerial(serial);
|
||||
|
||||
native int GetClientFromSerial(int serial);
|
||||
|
||||
Reference in New Issue
Block a user