Raised This Month: $ Target: $400
 0% 

Hostage Creating Help!!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
asur
Member
Join Date: Dec 2014
Old 10-10-2015 , 03:28   Hostage Creating Help!!
Reply With Quote #1

I dont know y the hostage is spawned above the ground not on the ground.........it is spawning at the height of my character's neck.....

I have calculated the origins from teleport plugin .....
Please help!!!!
PHP Code:
#include <amxmodx>
#include <engine>

public plugin_init() {
    
register_plugin("Hostage Spawner""1.0""NONE")
    
register_concmd("hostage""host_spawn")
}

public 
plugin_precache() {
    
precache_model("models/hostage.mdl")
    
precache_sound("hostage/hos1.wav")
}

public 
host_spawn(id) {
    new 
Float:origin[3] = { -2687.0574.0, -1962.0 }
    new 
host create_entity("hostage_entity")
    if( 
is_valid_enthost ) )
    {
        
entity_set_float(host,EV_FL_takedamage,1.0)
        
entity_set_float(host,EV_FL_health,100.0)
        
        
entity_set_string(host,EV_SZ_classname,"hostage_entity");
        
entity_set_model(host,"models/hostage.mdl");
        
entity_set_int(host,EV_INT_solid2)
        
        
/*entity_set_byte(host,EV_BYTE_controller1,125);
        entity_set_byte(host,EV_BYTE_controller2,125);
        entity_set_byte(host,EV_BYTE_controller3,125);
        entity_set_byte(host,EV_BYTE_controller4,125);
        */
        
new Float:maxs[3] = {16.0,16.0,36.0}
        new 
Float:mins[3] = {-16.0,-16.0,-36.0}
        
entity_set_size(host,mins,maxs)
        
        
/*entity_set_float(host,EV_FL_animtime,2.0)
        entity_set_float(host,EV_FL_framerate,1.0)
        entity_set_int(host,EV_INT_sequence,0);
        */
        
entity_set_float(host,EV_FL_nextthink,halflife_time() + 0.01)
        
        
entity_set_origin(host,origin)
        
        
//drop_to_floor(host)
    
        
return 1
    
}
    
    return 
0
       

Attached Images
File Type: jpg jail_akd_snowyday0003.bmp.jpg (41.2 KB, 151 views)

Last edited by asur; 10-10-2015 at 03:44.
asur 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 22:04.


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