Quote:
Originally Posted by kasu007
PHP Code:
but inside the funtion will it do? for(new i; i<512; i++){ myArray[i] = 0; }
|
Sometimes, yes. But not on null value.
This is the native and it can be found in amxmodx.cpp.
Code:
static cell AMX_NATIVE_CALL arrayset(AMX *amx, cell *params)
{
cell value = params[2];
if (!value)
{
memset(get_amxaddr(amx, params[1]), 0, params[3] * sizeof(cell));
} else {
int size = params[3];
cell *addr = get_amxaddr(amx, params[1]);
for (int i=0; i<size; i++)
{
addr[i] = value;
}
}
return 1;
}
__________________