Raised This Month: $ Target: $400
 0% 

2 questions %i and setting admin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 01-16-2014 , 17:21   Re: 2 questions %i and setting admin
Reply With Quote #5

Quote:
Originally Posted by kasu007 View Post
PHP Code:
but inside the funtion will it do?
for(new 
ii<512i++){
   
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; }
__________________

Last edited by Black Rose; 01-16-2014 at 17:22.
Black Rose is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode