Commit 66513517 authored by JoyJ's avatar JoyJ

Revert "downgrade include"

This reverts commit 68a2c4c4.
parent ad6f2548
......@@ -133,6 +133,31 @@ methodmap Cookie < Handle {
// @error Invalid cookie handle or invalid client index.
public native void Set(int client, const char[] value);
// Set the integer value of a Client preference cookie.
//
// @param client Client index.
// @param value Integer value to set.
// @error Invalid cookie handle or invalid client index.
public void SetInt(int client, int value) {
char sValue[11];
IntToString(value, sValue, sizeof(sValue));
this.Set(client, sValue);
}
// Set the float value of a Client preference cookie.
//
// @param client Client index.
// @param value Float value to set.
// @error Invalid cookie handle or invalid client index.
public void SetFloat(int client, float value) {
char sValue[32];
FloatToString(value, sValue, sizeof(sValue));
this.Set(client, sValue);
}
// Retrieve the value of a Client preference cookie.
//
// @param client Client index.
......@@ -141,7 +166,43 @@ methodmap Cookie < Handle {
// @error Invalid cookie handle or invalid client index.
public native void Get(int client, char[] buffer, int maxlen);
// Sets the value of a Client preference cookie based on an authID string.
// Retrieve the integer value of a Client preference cookie.
//
// @param client Client index.
// @return Integer value of cookie
// @error Invalid cookie handle or invalid client index.
public int GetInt(int client, int defaultValue = 0)
{
char buffer[11];
this.Get(client, buffer, sizeof(buffer));
int value;
if (!StringToIntEx(buffer, value))
{
value = defaultValue;
}
return value;
}
// Retrieve the float value of a Client preference cookie.
//
// @param client Client index.
// @return Float value of cookie
// @error Invalid cookie handle or invalid client index.
public float GetFloat(int client, float defaultValue = 0.0)
{
char buffer[32];
this.Get(client, buffer, sizeof(buffer));
float value;
if (!StringToFloatEx(buffer, value))
{
value = defaultValue;
}
return value;
}
// Set the value of a Client preference cookie based on an authID string.
//
// @param authID String Auth/STEAM ID of player to set.
// @param value String value to set.
......
......@@ -575,7 +575,7 @@ native bool RemoveDir(const char[] path);
/**
* Creates a directory.
*
* @param path Path to create.
* @param path Path to create. Note that directories are not created recursively unless use_valve_fs is used.
* @param mode Permissions (default is o=rx,g=rx,u=rwx). Note that folders must have
* the execute bit set on Linux. On Windows, the mode is ignored.
* @param use_valve_fs If true, the Valve file system will be used instead.
......@@ -585,7 +585,7 @@ native bool RemoveDir(const char[] path);
* In this case, mode is ignored.
* @return True on success, false otherwise.
*/
native bool CreateDirectory(const char[] path, int mode, bool use_valve_fs=false, const char[] valve_path_id="DEFAULT_WRITE_PATH");
native bool CreateDirectory(const char[] path, int mode=FPERM_O_READ|FPERM_O_EXEC|FPERM_G_READ|FPERM_G_EXEC|FPERM_U_READ|FPERM_U_WRITE|FPERM_U_EXEC, bool use_valve_fs=false, const char[] valve_path_id="DEFAULT_WRITE_PATH");
/**
* Changes a file or directories permissions.
......
......@@ -390,9 +390,9 @@ stock bool operator<=(int oper1, float oper2)
/**
* Forbidden operators.
*/
forward operator%(float oper1, float oper2);
forward operator%(float oper1, int oper2);
forward operator%(int oper1, float oper2);
forward float operator%(float oper1, float oper2);
forward float operator%(float oper1, int oper2);
forward float operator%(int oper1, float oper2);
#endif // __sourcepawn2__
#define FLOAT_PI 3.1415926535897932384626433832795
......
......@@ -99,6 +99,15 @@ native void GetLanguageInfo(int language, char[] code="", int codeLen=0, char[]
*/
native void SetClientLanguage(int client, int language);
/**
* Retrieves the language number a client had when they connected.
*
* @param client Client index.
* @return Language number client originally had.
* @error Invalid client index or client not connected.
*/
native int GetClientOriginalLanguage(int client);
/**
* Retrieves the language number from a language code.
*
......
......@@ -61,7 +61,8 @@ enum SDKCallType
SDKCall_GameRules, /**< CGameRules call */
SDKCall_EntityList, /**< CGlobalEntityList call */
SDKCall_Raw, /**< |this| pointer with an arbitrary address */
SDKCall_Server /**< CBaseServer call */
SDKCall_Server, /**< CBaseServer call */
SDKCall_Engine /**< CVEngineServer call */
};
enum SDKLibrary
......
......@@ -102,9 +102,10 @@ native void TeleportEntity(int entity, const float origin[3] = NULL_VECTOR, cons
* Forces a player to commit suicide.
*
* @param client Client index.
* @param explode If true, explode the player.
* @error Invalid client or client not in game, or lack of mod support.
*/
native void ForcePlayerSuicide(int client);
native void ForcePlayerSuicide(int client, bool explode = false);
/**
* Slaps a player in a random direction.
......
......@@ -76,6 +76,7 @@ struct Plugin
#include <commandfilters>
#include <nextmap>
#include <commandline>
#include <entitylump>
enum APLRes
{
......@@ -397,7 +398,7 @@ native int GetTime(int bigStamp[2]={0,0});
* Produces a date and/or time string value for a timestamp.
*
* See this URL for valid parameters:
* http://cplusplus.com/reference/clibrary/ctime/strftime.html
* https://cplusplus.com/reference/ctime/strftime/
*
* Note that available parameters depends on support from your operating system.
* In particular, ones highlighted in yellow on that page are not currently
......
......@@ -42,8 +42,8 @@
#define SOURCEMOD_V_REV 0
#define SOURCEMOD_V_CSET "0"
#define SOURCEMOD_V_MAJOR 1 /**< SourceMod Major version */
#define SOURCEMOD_V_MINOR 11 /**< SourceMod Minor version */
#define SOURCEMOD_V_MINOR 12 /**< SourceMod Minor version */
#define SOURCEMOD_V_RELEASE 0 /**< SourceMod Release version */
#define SOURCEMOD_VERSION "1.11.0-manual" /**< SourceMod version string (major.minor.release-tag) */
#define SOURCEMOD_VERSION "1.12.0-manual" /**< SourceMod version string (major.minor.release-tag) */
#endif
......@@ -5,11 +5,11 @@
#define _auto_version_included
#define SOURCEMOD_V_TAG ""
#define SOURCEMOD_V_CSET "2f0ba0f3"
#define SOURCEMOD_V_CSET "855ece1d"
#define SOURCEMOD_V_MAJOR 1
#define SOURCEMOD_V_MINOR 11
#define SOURCEMOD_V_MINOR 12
#define SOURCEMOD_V_RELEASE 0
#define SOURCEMOD_V_REV 6911
#define SOURCEMOD_V_REV 6925
#define SOURCEMOD_VERSION "1.11.0.6911"
#define SOURCEMOD_VERSION "1.12.0.6925"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment