SAPE ERROR: Не могу подключиться к серверу: dispenser-01.saperu.net/code.php?user=836f97673aa6aa25a35b5029263ee232&host=amxxmodx.ru&charset=windows-1251&format=serialize, type: file_get_contents

SAPE ERROR: Не могу подключиться к серверу: dispenser-02.saperu.net/code.php?user=836f97673aa6aa25a35b5029263ee232&host=amxxmodx.ru&charset=windows-1251&format=serialize, type: file_get_contents

floatround » AmxModX
| |
 RSS
  • OnLine

    : 5
    : 4
    : -
    : crawl Bot

    ?

    • AMX Mod X
    • up.org.ua


  • : Admin : 8-12-2011, 00:35 : 7553

    floatround

    , : " ?". , . . floatround, .

    float.inc:
    /* Round a float into a integer value */
    native floatround(Float:value, floatround_method:method=floatround_round);


    :
    floatround ( Float:value, floatround_method:method=floatround_round )

    • Float:value - , .
    • floatround_method:method=floatround_round -
      • floatround_round - ,
      • floatround_floor -
      • floatround_ceil -
      • floatround_tozero - .



    :
    Native

    :
    /* Plugin generated by AMXX-Studio */

    #include <amxmodx>
    #include <amxmisc>
    #include <float>

    #define PLUGIN "[float.inc] floatround"
    #define VERSION "1.0"
    #define AUTHOR "Admin"

    public plugin_init() {
        
        register_plugin(PLUGIN, VERSION, AUTHOR)

        register_concmd("float-round","f_floatround")
        
    }
    public f_floatround(){
        
        new Float: num_float = 1.20
        server_print("^nFloat: %.2f",num_float)
        new num_integer
        
        num_integer = floatround(num_float,floatround_round)
        server_print("Integer num: %d", num_integer)
        
        num_integer = floatround(num_float,floatround_floor)
        server_print("Integer num: %d", num_integer)
        
        num_integer = floatround(num_float,floatround_ceil)
        server_print("Integer num: %d", num_integer)
        
        num_integer = floatround(num_float,floatround_tozero)
        server_print("Integer num: %d", num_integer)

        num_float = 1.50
        server_print("^nFloat: %.2f",num_float)
        

        num_integer = floatround(num_float,floatround_round)
        server_print("Integer num: %d", num_integer)
        
        num_integer = floatround(num_float,floatround_floor)
        server_print("Integer num: %d", num_integer)
        
        num_integer = floatround(num_float,floatround_ceil)
        server_print("Integer num: %d", num_integer)
        
        num_integer = floatround(num_float,floatround_tozero)
        server_print("Integer num: %d", num_integer)
        
        num_float = 1.70
        server_print("^nFloat: %.2f",num_float)

        num_integer = floatround(num_float,floatround_round)
        server_print("Integer num: %d", num_integer)
        
        num_integer = floatround(num_float,floatround_floor)
        server_print("Integer num: %d", num_integer)
        
        num_integer = floatround(num_float,floatround_ceil)
        server_print("Integer num: %d", num_integer)
        
        num_integer = floatround(num_float,floatround_tozero)
        server_print("Integer num: %d", num_integer)
    }


    :
    , :
    float-round

    Float: 1.20
    Integer num: 1
    Integer num: 1
    Integer num: 2
    Integer num: 1

    Float: 1.50
    Integer num: 2
    Integer num: 1
    Integer num: 2
    Integer num: 1

    Float: 1.70
    Integer num: 2
    Integer num: 1
    Integer num: 2
    Integer num: 1

    .
    , .

    , , .
    , . , .
    , .
    .
    floatround
    gavrilyuc

    --
    ICQ: --
    : 0
    : 0
    : -  0  +

    #define MAX_LEVEL 50
    #define COF_LEVEL 1.5
    new gLevels[MAX_LEVEL + 1];

    Set_Levels() {
    server_print("******** BEGIN ***************");
    new st_exp = 15;
    gLevels[0] = 0;
    gLevels[1] = st_exp;
    server_print("%d --> %d", 1, gLevels[1]);
    for(new i = 2; i < MAX_LEVEL; i++) {
    st_exp = (st_exp * COF_LEVEL);
    gLevels[i] = floatround(st_exp, floatround_ceil);
    server_print("%d --> %d", i, gLevels[i]);
    }
    server_print("******** END ***************");
    }

    ?
    :

    1 --> 15
    2 --> 23
    3 --> 1653473280
    4 --> 1982310912
    5 --> 1986164480
    6 --> 1986209664
    7 --> 1986210304
    8 --> 1986210304
    9 --> 1986210304
    10 --> 1986210304
    11 --> 1986210304
    12 --> 1986210304
    13 --> 1986210304
    14 --> 1986210304
    15 --> 1986210304
    16 --> 1986210304
    17 --> 1986210304
    18 --> 1986210304
    19 --> 1986210304
    20 --> 1986210304
    21 --> 1986210304
    22 --> 1986210304
    23 --> 1986210304
    24 --> 1986210304
    25 --> 1986210304
    26 --> 1986210304
    27 --> 1986210304
    28 --> 1986210304
    29 --> 1986210304
    30 --> 1986210304
    31 --> 1986210304
    32 --> 1986210304
    33 --> 1986210304
    34 --> 1986210304
    35 --> 1986210304
    36 --> 1986210304
    37 --> 1986210304
    38 --> 1986210304
    39 --> 1986210304
    40 --> 1986210304
    41 --> 1986210304
    42 --> 1986210304
    43 --> 1986210304
    44 --> 1986210304
    45 --> 1986210304
    46 --> 1986210304
    47 --> 1986210304
    48 --> 1986210304
    49 --> 1986210304
    .

    Radius

    7.05.2013
    ICQ: 357188115
    : 1
    : 57
    : -  4  +

    (st_exp * COF_LEVEL)


    Float, COF_LEVEL (1.5), Float.

    st_exp , "" .

    , , .