Page 1 of 1

stock is_big_map()

Posted: Tue Oct 06, 2026 1:04 am
by Archive-Poster

Code: Select all

///Uses: Sandboxing, more.
stock is_big_map(){new Float:mega = (0.001);
    new adjmsize,mname[32];
    get_mapname(mname,charsmax (mname));
    new Float:msize = (filesize("maps/%s.bsp",mname, charsmax (mname))*(mega)/1024); 
    adjmsize = floatround(msize, floatround_ceil);
    return adjmsize;}
/***Examples:
**if( is_big_map() < 2 ) {  ///Code runs on maps less than 2 MB.
**if( is_big_map() > 5 ) {  ///Code runs on maps larger than 5 MB.
*/