plugins/include/sourcemod.inc
changeset 458 77520125ee67
parent 457 9b8a85bf4175
child 460 0be67c5566c6
     1.1 --- a/plugins/include/sourcemod.inc	Thu Feb 08 21:41:28 2007 +0000
     1.2 +++ b/plugins/include/sourcemod.inc	Fri Feb 09 01:08:59 2007 +0000
     1.3 @@ -235,10 +235,73 @@
     1.4   * @param value			Buffer to store value.
     1.5   * @param maxlen		Maximum length of valve (UTF-8 safe).
     1.6   * @return 				True on success, false otherwise.
     1.7 + * @error				Invalid client index, or client not connected.
     1.8   */
     1.9  native bool:GetClientInfo(client, const String:key[], String:value[], maxlen);
    1.10  
    1.11  /**
    1.12 + * Sets a client's AdminId.  
    1.13 + *
    1.14 + * @param client		Player's index.
    1.15 + * @param id			AdminId to set.  INVALID_ADMIN_ID removes admin permissions.
    1.16 + * @param temp			True if the id should be freed on disconnect.
    1.17 + * @noreturn
    1.18 + * @error				Invalid client index, client not connected, or bogus AdminId.
    1.19 + */
    1.20 +native SetUserAdmin(client, AdminId:id, bool:temp=false);
    1.21 +
    1.22 +/**
    1.23 + * Retrieves a client's AdminId.
    1.24 + *
    1.25 + * @param client		Player's index.
    1.26 + * @return				AdminId of the client, or INVALID_ADMIN_ID if none.
    1.27 + * @error				Invalid client index, or client not connected.
    1.28 + */
    1.29 +native AdminId:GetUserAdmin(client);
    1.30 +
    1.31 +/**
    1.32 + * Sets access flags on a client.  If the client is not an admin,
    1.33 + * a temporary, anonymous AdminId is given.
    1.34 + *
    1.35 + * @param client		Player's index.
    1.36 + * @param ...			Flags to set on the client.
    1.37 + * @noreturn
    1.38 + * @error				Invalid client index, or client not connected.
    1.39 + */
    1.40 +native AddUserFlags(client, {AdminFlag}:...);
    1.41 +
    1.42 +/**
    1.43 + * Removes flags from a client.  If the client is not an admin,
    1.44 + * this has no effect.
    1.45 + *
    1.46 + * @param client		Player's index.
    1.47 + * @param ...			Flags to remove from the client.
    1.48 + * @noreturn
    1.49 + * @error				Invalid client index, or client not connected.
    1.50 + */
    1.51 +native RemoveUserFlags(client, {AdminFlag}:...);
    1.52 +
    1.53 +/** 
    1.54 + * Sets access flags on a client using bits instead of flags.  If the
    1.55 + * client is not an admin, and flags not 0, a temporary, anonymous AdminId is given.
    1.56 + *
    1.57 + * @param client		Player's index.
    1.58 + * @param flags			Bitstring of flags to set on client.
    1.59 + * @noreturn
    1.60 + */
    1.61 +native SetUserFlagBits(client, flags);
    1.62 +
    1.63 +/**
    1.64 + * Returns client access flags.  If the client is not an admin,
    1.65 + * the result is always 0.
    1.66 + * 
    1.67 + * @param client		Player's index.
    1.68 + * @return				Flags
    1.69 + * @error				Invalid client index, or client not connected.
    1.70 + */
    1.71 +native GetUserFlagBits(client);
    1.72 +
    1.73 +/**
    1.74   * Sends a message to the server console.
    1.75   *
    1.76   * @param format		Formatting rules.