mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-02-05 02:00:31 +03:00
commit
61b996ee8c
@ -338,7 +338,7 @@ static cell AMX_NATIVE_CALL client_print_color(AMX *amx, cell *params) /* 3 para
|
||||
g_langMngr.SetDefLang(i);
|
||||
msg = format_amxstring(amx, params, 3, len);
|
||||
|
||||
if (*msg > 4) // Insert default color code at the start if not present, otherwise message will not be colored.
|
||||
if (static_cast<byte>(*msg) > 4) // Insert default color code at the start if not present, otherwise message will not be colored.
|
||||
{
|
||||
memmove(msg + 1, msg, ke::Min(len++, 191));
|
||||
*msg = 1;
|
||||
@ -376,7 +376,7 @@ static cell AMX_NATIVE_CALL client_print_color(AMX *amx, cell *params) /* 3 para
|
||||
|
||||
msg = format_amxstring(amx, params, 3, len);
|
||||
|
||||
if (*msg > 4) // Insert default color code at the start if not present, otherwise message will not be colored.
|
||||
if (static_cast<byte>(*msg) > 4) // Insert default color code at the start if not present, otherwise message will not be colored.
|
||||
{
|
||||
memmove(msg + 1, msg, ke::Min(len++, 191));
|
||||
*msg = 1;
|
||||
@ -2615,11 +2615,11 @@ static cell AMX_NATIVE_CALL change_task(AMX *amx, cell *params)
|
||||
static cell AMX_NATIVE_CALL engine_changelevel(AMX *amx, cell *params)
|
||||
{
|
||||
int length;
|
||||
const char* new_map = get_amxstring(amx, params[1], 0, length);
|
||||
ke::AString new_map(get_amxstring(amx, params[1], 0, length));
|
||||
|
||||
// Same as calling "changelevel" command but will trigger "server_changelevel" AMXX forward as well.
|
||||
// Filling second param will call "changelevel2" command, but this is not usable in multiplayer game.
|
||||
g_pEngTable->pfnChangeLevel(new_map, NULL);
|
||||
g_pEngTable->pfnChangeLevel(new_map.chars(), NULL);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -625,7 +625,7 @@
|
||||
#define TRAIN_MEDIUM 0x03
|
||||
#define TRAIN_FAST 0x04
|
||||
#define TRAIN_BACK 0x05
|
||||
|
||||
|
||||
/**
|
||||
* Valve Mod Weapon Constants
|
||||
*/
|
||||
@ -660,7 +660,7 @@
|
||||
#define ITEM_FLAG_NOAUTORELOAD (1<<1)
|
||||
#define ITEM_FLAG_NOAUTOSWITCHEMPTY (1<<2)
|
||||
#define ITEM_FLAG_LIMITINWORLD (1<<3)
|
||||
#define ITEM_FLAG_EXHAUSTIBLE (1<<4)
|
||||
#define ITEM_FLAG_EXHAUSTIBLE (1<<4)
|
||||
|
||||
|
||||
#define FEV_NOTHOST (1<<0) // Skip local host for event send.
|
||||
|
@ -103,7 +103,7 @@ native AddTranslation(const lang[3], TransKey:key, const phrase[]);
|
||||
*
|
||||
* @return 1 on success, 0 otherwise
|
||||
*/
|
||||
native LookupLangKey(Output[], OutputSize, const Key[], &id);
|
||||
native LookupLangKey(Output[], OutputSize, const Key[], const &id);
|
||||
|
||||
/**
|
||||
* Sets the global language target.
|
||||
|
@ -37,7 +37,7 @@
|
||||
native nvault_open(const name[]);
|
||||
|
||||
/**
|
||||
* Retrieves a value from the given key
|
||||
* Retrieves a value from the given key.
|
||||
*
|
||||
* @note An example of retrieving a string:
|
||||
* nvault_get(vaultHandle, "myKey", myString, charsmax(myString));
|
||||
@ -50,13 +50,16 @@ native nvault_open(const name[]);
|
||||
* vault and copies it to the third argument, up to
|
||||
* 4th argument characters.
|
||||
*
|
||||
* @noreturn
|
||||
* @return Result as integer if only the first two arguments
|
||||
* of the function are used.
|
||||
* 1 if only the first three arguments are used.
|
||||
* String length if all four parameters are used.
|
||||
* @error On invalid vault handle.
|
||||
*/
|
||||
native nvault_get(vault, const key[], any:...);
|
||||
|
||||
/**
|
||||
* Retrieves full information about a vault entry
|
||||
* Retrieves full information about a vault entry.
|
||||
*
|
||||
* @param vault A vault handle returned from nvault_open()
|
||||
* @param key A key to get information from
|
||||
@ -109,7 +112,7 @@ native nvault_pset(vault, const key[], const value[]);
|
||||
* @param start The timestamp to start erasing from
|
||||
* @param end The timestamp to erase to
|
||||
*
|
||||
* @noreturn
|
||||
* @return Number of erased values.
|
||||
* @error On invalid vault handle.
|
||||
*/
|
||||
native nvault_prune(vault, start, end);
|
||||
|
Loading…
x
Reference in New Issue
Block a user