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

get_entity_distance / » AmxModX
| |
 RSS
  • OnLine

    : 9
    : 6
    : -
    : crawl Bot, Google Bot, Google Bot

    ?

    • AMX Mod X
    • up.org.ua


  • : Admin : 26-10-2011, 03:10 : 3120

    get_entity_distance /

    , , .

    engine_stocks.inc:
    /* Get the distance between two entities */
    stock get_entity_distance(ent1, ent2)
    {
        return floatround(entity_range(ent1, ent2));
    }


    :
    get_entity_distance ( ent1, ent2 )

    • ent1 - /
    • ent2 - /


    :
    stock

    :
    /* Plugin generated by AMXX-Studio */

    #include <amxmodx>
    #include <amxmisc>
    #include <engine>

    #define PLUGIN "[engine.inc] get_entity_distance"
    #define VERSION "1.0"
    #define AUTHOR "Admin"

    new Ent
    new g_Model[] = {"models/chick.mdl"}

    public plugin_init() {
        register_plugin(PLUGIN, VERSION, AUTHOR)
        register_clcmd("say /distance","distance")
        register_clcmd("say /chick","add_chicken")
        
    }
    public plugin_precache(){
        precache_model(g_Model)
    }
    public distance(id){    

        new units = get_entity_distance(id,Ent)
        client_print(id,print_chat,"Distance between you and a hen of %d", units)
    }

    public add_chicken(id){
        
        Ent = create_entity("info_target")
        
        if(is_valid_ent(Ent)){
            
            entity_set_model(Ent, g_Model)
            entity_set_size(Ent,Float:{-6.0, -10.0, 0.0},Float:{6.0, 10.0, 18.0})
            new Float:f_Origin[3]
            entity_get_vector(id, EV_VEC_origin, f_Origin)    
            f_Origin[0] += 50.0
            entity_set_origin(Ent, f_Origin)        
            entity_set_int(Ent,EV_INT_solid,SOLID_BBOX)
            
            entity_set_float(Ent, EV_FL_takedamage, DAMAGE_YES)
            
            new Float:angles[3]
            angles[0] = 0.0
            angles[1] = 0.0
            angles[2] = 0.0
            entity_set_vector(Ent,EV_VEC_angles,angles)
            
            drop_to_floor(Ent)
        }
    }


    :
    , " ", :)
    , " " , , say /chick, say /distance .

    , (id ), 2 .
    . , entity_range, .
    , .
    .
    get_entity_distance /