mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-02-05 10:10:36 +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);
|
g_langMngr.SetDefLang(i);
|
||||||
msg = format_amxstring(amx, params, 3, len);
|
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));
|
memmove(msg + 1, msg, ke::Min(len++, 191));
|
||||||
*msg = 1;
|
*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);
|
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));
|
memmove(msg + 1, msg, ke::Min(len++, 191));
|
||||||
*msg = 1;
|
*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)
|
static cell AMX_NATIVE_CALL engine_changelevel(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int length;
|
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.
|
// 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.
|
// 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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ native AddTranslation(const lang[3], TransKey:key, const phrase[]);
|
|||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @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.
|
* Sets the global language target.
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
native nvault_open(const name[]);
|
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:
|
* @note An example of retrieving a string:
|
||||||
* nvault_get(vaultHandle, "myKey", myString, charsmax(myString));
|
* 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
|
* vault and copies it to the third argument, up to
|
||||||
* 4th argument characters.
|
* 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.
|
* @error On invalid vault handle.
|
||||||
*/
|
*/
|
||||||
native nvault_get(vault, const key[], any:...);
|
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 vault A vault handle returned from nvault_open()
|
||||||
* @param key A key to get information from
|
* @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 start The timestamp to start erasing from
|
||||||
* @param end The timestamp to erase to
|
* @param end The timestamp to erase to
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @return Number of erased values.
|
||||||
* @error On invalid vault handle.
|
* @error On invalid vault handle.
|
||||||
*/
|
*/
|
||||||
native nvault_prune(vault, start, end);
|
native nvault_prune(vault, start, end);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user