Requirements:
Zombie:Reloaded 3.1 or higher
Decription:
-----------------------------------------------------------------
Provides some more natives to manage over the player class attributes
-----------------------------------------------------------------
For developers:
-----------------------------------------------------------------
PHP Code:
/**
* Gets client class section name in the config
*
* @param client Client index.
* @param buffer Buffer to store the class section name in.
* @param maxlen Max length to store.
*
* @return Number of bytes written to the buffer.
* @error If the client is not in game or invalid.
*/
native ZRT_GetClientClassSectionName(client, String:buffer[], maxlen);
/**
* Gets attribute string of the player's class
*
* @param client Client index.
* @param attrib Attribute name.
* @param buffer Buffer to store the attribute string in.
* @param maxlen Max length to store.
* @param defvalue Optional default value to use if the attribute is not found.
*
* @return Number of bytes written to the buffer.
* @error If the client is not in game or invalid.
*/
native ZRT_GetClientAttributeString(client, const String:attrib[], String:buffer[], maxlen, const String:defvalue[] = "");
/**
* Gets attribute numeric value of the player's class
*
* @param client Client index.
* @param attrib Attribute name.
* @param defvalue Optional default value to use if the attribute is not found.
*
* @return Retrieves the numeric value.
* @error If the client is not in game or invalid.
*/
native ZRT_GetClientAttributeValue(client, const String:attrib[], defvalue = 0);
/**
* Gets attribute floating value of the player's class
*
* @param client Client index.
* @param attrib Attribute name.
* @param defvalue Optional default value to use if the attribute is not found.
*
* @return Retrieves the floating value.
* @error If the client is not in game or invalid.
*/
native Float:ZRT_GetClientAttributeValueFloat(client, const String:attrib[], Float:defvalue = 0.0);
/**
* Whether the player has attribute
*
* @param client Client index.
* @param attrib Attribute name.
*
* @return True on success, false otherwise.
* @error If the client is not in game or invalid.
*/
native bool:ZRT_PlayerHasAttribute(client, const String:attrib[]);
/**
* Whether the round is active
*
* @noparams
*
* @return True on round active, false otherwise
* @noerror
*/
native bool:ZRT_IsRoundActive();
-----------------------------------------------------------------
Installation:
-----------------------------------------------------------------
1. Put
zr_tools.smx to the
sourcemod/plugins folder
2. Put
zr_tools.sp to the
sourcemod/scripting folder
3. Put
zr_tools.inc to the
sourcemod/scripting/include folder
4.
Restart server or
change map or
type sm plugins load zr_tools in the server console or via rcon command
-----------------------------------------------------------------
Changelog:
Code:
- v1.6 - First release on AlliedModders
- v1.6.1 - Changed natives prefix to ZRT