added arrayset native

This commit is contained in:
Borja Ferrer 2006-03-16 00:13:13 +00:00
parent 7190d933b4
commit 7e97156fc4
2 changed files with 13 additions and 0 deletions

View File

@ -4042,9 +4042,17 @@ static cell AMX_NATIVE_CALL ShowSyncHudMsg(AMX *amx, cell *params)
return len;
}
static cell AMX_NATIVE_CALL arrayset(AMX *amx, cell *params)
{
memset(get_amxaddr(amx, params[1]), params[2], params[3] * sizeof(cell));
return 1;
}
AMX_NATIVE_INFO amxmodx_Natives[] =
{
{"abort", amx_abort},
{"arrayset", arrayset},
{"get_addr_val", get_addr_val},
{"get_var_addr", get_var_addr},
{"set_addr_val", set_addr_val},

View File

@ -1036,3 +1036,8 @@ native set_pcvar_num(pcvar, num);
native Float:get_pcvar_float(pcvar);
native set_pcvar_float(pcvar, Float:num);
native get_pcvar_string(pcvar, string[], maxlen);
/**
* Sets a whole array to a certain value.
*/
native arrayset(array[], value, size);