Raised This Month: $ Target: $400
 0% 

Hostage Creating Help!!


Post New Thread Reply   
 
Thread Tools Display Modes
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
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-10-2015 , 07:40   Re: Hostage Creating Help!!
Reply With Quote #2

What do you want to do ? Create a true hostage or just some dummy entity that looks like one ? It should be created with a command ? Where should it be created ? At the aim of the player, where the player is on at T spawn ?
__________________
HamletEagle is offline
asur
Member
Join Date: Dec 2014
Old 10-10-2015 , 09:30   Re: Hostage Creating Help!!
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
What do you want to do ? Create a true hostage or just some dummy entity that looks like one ? It should be created with a command ? Where should it be created ? At the aim of the player, where the player is on at T spawn ?
Quote:
What do you want to do
-->
PHP Code:
Create a dummy entity
Quote:
It should be created with a command ?
Srry but this one is k by adding this >>
-->
PHP Code:
public plugin_init() { 
    
register_plugin("Hostage Spawner""1.0""NONE"
    
set_task(1.0"host_spawn"

Quote:
Where should it be created ?
-->
PHP Code:
new Float:origin[3] = { -2687.0574.0, -1962.0 
srry for incomplete ques!!!
Now pls help

Last edited by asur; 10-10-2015 at 09:31.
asur is offline
asur
Member
Join Date: Dec 2014
Old 10-13-2015 , 04:32   Re: Hostage Creating Help!!
Reply With Quote #4

Help pls ^
asur is offline
Reply



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