| |
 RSS
  • OnLine

    : 2
    : 1
    : -
    : crawl Bot

    ?

    • AMX Mod X
    • up.org.ua


  • : Monstr : 12-05-2013, 09:32 : 4130

    TE_EXPLOSION -

    TE_EXPLOSION - .

    #defineTE_EXPLOSION3// Additive sprite, 2 dynamic lights, flickering particles, explosion sound, move vertically 8 pps
    // write_byte(TE_EXPLOSION)
    // write_coord(position.x)
    // write_coord(position.y)
    // write_coord(position.z)
    // write_short(sprite index)
    // write_byte(scale in 0.1's)
    // write_byte(framerate)
    // write_byte(flags)
    //
    // The Explosion effect has some flags to control performance/aesthetic features:
    #define TE_EXPLFLAG_NONE0// All flags clear makes default Half-Life explosion
    #define TE_EXPLFLAG_NOADDITIVE1// Sprite will be drawn opaque (ensure that the sprite you send is a non-additive sprite)
    #define TE_EXPLFLAG_NODLIGHTS 2// Do not render dynamic lights
    #define TE_EXPLFLAG_NOSOUND 4// Do not play client explosion sound
    #define TE_EXPLFLAG_NOPARTICLES 8// Do not draw particles


    :
    message_begin, message_end .

    :
    /*
    #define TE_EXPLFLAG_NONE0//
    #define TE_EXPLFLAG_NOADDITIVE1// ( )
    #define TE_EXPLFLAG_NODLIGHTS 2//
    #define TE_EXPLFLAG_NOSOUND 4//
    #define TE_EXPLFLAG_NOPARTICLES 8//
    */

    #include <amxmodx>
    #include <engine>

    #pragma semicolon1
    #pragma tabsize 0

    #define PLUGIN "[MSG][SVC_TEMPENTITY] -> TE_EXPLOSION"
    #define VERSION "0.1"
    #define AUTHOR "Mon[str]"


    new _:g_iSpiteExlplosion;

    new _:g_cvar_ExplScall;
    new _:g_cvar_ExplSpeed;
    new _:g_cvar_ExplFlag;


    public plugin_precache()
    {
    /* precache_model */
    g_iSpiteExlplosion = precache_model("sprites/dexplo.spr");
    }

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

    /* */
    register_concmd("Explosion", "_Explosion");

    /* */
    g_cvar_ExplScall = register_cvar("[TE_EXPLOSION] -> Cvars -> Scall", "10");
    g_cvar_ExplSpeed = register_cvar("[TE_EXPLOSION] -> Cvars -> Speed", "10");
    g_cvar_ExplFlag = register_cvar("[TE_EXPLOSION] -> Cvars -> Flag", "0");


    /* */
    set_lights("c");
    }

    public _Explosion(id)
    {
    new _:iAimOrigin[3];

    /* */
    get_user_origin(id, iAimOrigin, 3);

    /* */
    iAimOrigin[2] += 25.0;

    /* */
    message_begin(MSG_BROADCAST, SVC_TEMPENTITY); //

    write_byte(TE_EXPLOSION); // (message_const.inc)

    /* */
    write_coord(iAimOrigin[0]); // x
    write_coord(iAimOrigin[1]);// y
    write_coord(iAimOrigin[2]);// z

    write_short(g_iSpiteExlplosion);//

    write_byte(get_pcvar_num(g_cvar_ExplScall));// (0.1)
    write_byte(get_pcvar_num(g_cvar_ExplSpeed));//
    write_byte(get_pcvar_num(g_cvar_ExplFlag));//

    message_end(); //

    return PLUGIN_HANDLED;
    }


    :
    , .
    .
    TE_EXPLOSION -
    Rom4Nk

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

    ?
    Monstr

    29.09.2011
    ICQ: 631967458
    : 12
    : 22
    : -  0  +

    #define TE_EXPLFLAG_NODLIGHTS 2//    

    , , .