Updated includes and spcomp to SourceMod 1.9

This commit is contained in:
BotoX
2016-08-23 15:34:00 +02:00
parent 0c0ce1adfc
commit 584ab0c27a
80 changed files with 2851 additions and 2474 deletions
+21 -28
View File
@@ -95,7 +95,7 @@ enum CookieMenuAction
* exists, a handle to it will still be returned.
* @error Cookie name is blank.
*/
native Handle:RegClientCookie(const String:name[], const String:description[], CookieAccess:access);
native Handle RegClientCookie(const char[] name, const char[] description, CookieAccess access);
/**
* Searches for a Client preference cookie.
@@ -106,7 +106,7 @@ native Handle:RegClientCookie(const String:name[], const String:description[], C
* @param name Name of cookie to find.
* @return A handle to the cookie if it is found. INVALID_HANDLE otherwise.
*/
native Handle:FindClientCookie(const String:name[]);
native Handle FindClientCookie(const char[] name);
/**
* Set the value of a Client preference cookie.
@@ -114,10 +114,9 @@ native Handle:FindClientCookie(const String:name[]);
* @param client Client index.
* @param cookie Client preference cookie handle.
* @param value String value to set.
* @noreturn
* @error Invalid cookie handle or invalid client index.
*/
native SetClientCookie(client, Handle:cookie, const String:value[]);
native void SetClientCookie(int client, Handle cookie, const char[] value);
/**
* Retrieve the value of a Client preference cookie.
@@ -126,10 +125,9 @@ native SetClientCookie(client, Handle:cookie, const String:value[]);
* @param cookie Client preference cookie handle.
* @param buffer Copyback buffer for value.
* @param maxlen Maximum length of the buffer.
* @noreturn
* @error Invalid cookie handle or invalid client index.
*/
native GetClientCookie(client, Handle:cookie, String:buffer[], maxlen);
native void GetClientCookie(int client, Handle cookie, char[] buffer, int maxlen);
/**
* Sets the value of a Client preference cookie based on an authID string.
@@ -137,10 +135,9 @@ native GetClientCookie(client, Handle:cookie, String:buffer[], maxlen);
* @param authID String Auth/STEAM ID of player to set.
* @param cookie Client preference cookie handle.
* @param value String value to set.
* @noreturn
* @error Invalid cookie handle.
*/
native SetAuthIdCookie(const String:authID[], Handle:cookie, const String:value[]);
native void SetAuthIdCookie(const char[] authID, Handle cookie, const char[] value);
/**
* Checks if a clients cookies have been loaded from the database.
@@ -149,14 +146,14 @@ native SetAuthIdCookie(const String:authID[], Handle:cookie, const String:value[
* @return True if loaded, false otherwise.
* @error Invalid client index.
*/
native bool:AreClientCookiesCached(client);
native bool AreClientCookiesCached(int client);
/**
* Called once a client's saved cookies have been loaded from the database.
*
* @param client Client index.
*/
forward OnClientCookiesCached(client);
forward void OnClientCookiesCached(int client);
/**
* Cookie Menu Callback prototype
@@ -166,7 +163,6 @@ forward OnClientCookiesCached(client);
* @param info Info data passed.
* @param buffer Outbut buffer.
* @param maxlen Max length of the output buffer.
* @noreturn
*/
typedef CookieMenuHandler = function void (
int client,
@@ -186,10 +182,9 @@ typedef CookieMenuHandler = function void (
* @param display Text to show on the menu.
* @param handler Optional handler callback for translations and output on selection
* @param info Info data to pass to the callback.
* @noreturn
* @error Invalid cookie handle.
*/
native SetCookiePrefabMenu(Handle:cookie, CookieMenu:type, const String:display[], CookieMenuHandler:handler=INVALID_FUNCTION, info=0);
native void SetCookiePrefabMenu(Handle cookie, CookieMenu type, const char[] display, CookieMenuHandler handler=INVALID_FUNCTION, any info=0);
/**
* Adds a new item to the client cookie settings menu.
@@ -199,25 +194,23 @@ native SetCookiePrefabMenu(Handle:cookie, CookieMenu:type, const String:display[
* @param handler A MenuHandler callback function.
* @param info Data to pass to the callback.
* @param display Text to show on the menu.
* @noreturn
* @error Invalid cookie handle.
*/
native SetCookieMenuItem(CookieMenuHandler:handler, any:info, const String:display[]);
native void SetCookieMenuItem(CookieMenuHandler handler, any info, const char[] display);
/**
* Displays the settings menu to a client.
*
* @param client Client index.
* @noreturn
*/
native ShowCookieMenu(client);
native void ShowCookieMenu(int client);
/**
* Gets a cookie iterator. Must be freed with CloseHandle().
*
* @return A new cookie iterator.
*/
native Handle:GetCookieIterator();
native Handle GetCookieIterator();
/**
* Reads a cookie iterator, then advances to the next cookie if any.
@@ -230,12 +223,12 @@ native Handle:GetCookieIterator();
* @param descLen Cookie description buffer size.
* @return True on success, false if there are no more commands.
*/
native bool:ReadCookieIterator(Handle:iter,
String:name[],
nameLen,
&CookieAccess:access,
String:desc[]="",
descLen=0);
native bool ReadCookieIterator(Handle iter,
char[] name,
int nameLen,
CookieAccess &access,
char[] desc="",
int descLen=0);
/**
* Returns the access level of a cookie
@@ -244,7 +237,7 @@ native bool:ReadCookieIterator(Handle:iter,
* @return CookieAccess access level.
* @error Invalid cookie handle.
*/
native CookieAccess:GetCookieAccess(Handle:cookie);
native CookieAccess GetCookieAccess(Handle cookie);
/**
* Returns the last updated timestamp for a client cookie
@@ -253,12 +246,12 @@ native CookieAccess:GetCookieAccess(Handle:cookie);
* @param cookie Cookie handle.
* @return Last updated timestamp.
*/
native GetClientCookieTime(client, Handle:cookie);
native int GetClientCookieTime(int client, Handle cookie);
/**
* Do not edit below this line!
*/
public Extension:__ext_cprefs =
public Extension __ext_cprefs =
{
name = "Client Preferences",
file = "clientprefs.ext",
@@ -271,7 +264,7 @@ public Extension:__ext_cprefs =
};
#if !defined REQUIRE_EXTENSIONS
public __ext_cprefs_SetNTVOptional()
public void __ext_cprefs_SetNTVOptional()
{
MarkNativeAsOptional("RegClientCookie");
MarkNativeAsOptional("FindClientCookie");