mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 06:45:37 +03:00
gab gab
This commit is contained in:
parent
91c082878c
commit
86c033a922
@ -3661,7 +3661,7 @@ static cell AMX_NATIVE_CALL set_fail_state(AMX *amx, cell *params)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static cell AMX_NATIVE_CALL amx_var_addr(AMX *amx, cell *params)
|
||||
static cell AMX_NATIVE_CALL get_var_addr(AMX *amx, cell *params)
|
||||
{
|
||||
if (params[0] / sizeof(cell) > 0)
|
||||
{
|
||||
@ -3671,7 +3671,7 @@ static cell AMX_NATIVE_CALL amx_var_addr(AMX *amx, cell *params)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static cell AMX_NATIVE_CALL amx_addr_val(AMX *amx, cell *params)
|
||||
static cell AMX_NATIVE_CALL get_addr_val(AMX *amx, cell *params)
|
||||
{
|
||||
cell *addr;
|
||||
int err;
|
||||
@ -3685,11 +3685,29 @@ static cell AMX_NATIVE_CALL amx_addr_val(AMX *amx, cell *params)
|
||||
return addr ? *addr : 0;
|
||||
}
|
||||
|
||||
static cell AMX_NATIVE_CALL set_addr_val(AMX *amx, cell *params)
|
||||
{
|
||||
cell *addr;
|
||||
int err;
|
||||
|
||||
if ( (err=amx_GetAddr(amx, params[1], &addr)) != AMX_ERR_NONE )
|
||||
{
|
||||
LogError(amx, err, "Bad reference %d supplied", params[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (addr)
|
||||
*addr = params[2];
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
AMX_NATIVE_INFO amxmodx_Natives[] =
|
||||
{
|
||||
{"abort", amx_abort},
|
||||
{"amx_addr_val", amx_addr_val},
|
||||
{"amx_var_addr", amx_var_addr},
|
||||
{"get_addr_val", get_addr_val},
|
||||
{"get_var_addr", get_var_addr},
|
||||
{"set_addr_val", set_addr_val},
|
||||
{"callfunc_begin", callfunc_begin},
|
||||
{"callfunc_begin_i", callfunc_begin_i},
|
||||
{"callfunc_end", callfunc_end},
|
||||
|
Loading…
Reference in New Issue
Block a user