Raised This Month: $ Target: $400
 0% 

Teleport Block


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BigMac
Member
Join Date: Jul 2009
Old 08-21-2009 , 20:17   Teleport Block
Reply With Quote #1

<hamsandwich>

What i am trying to do is make a block where you could set start destination and end destination like BCM has it. I look at the BCM code but its different. Hmmm am i on the right track on getting this to work?


PHP Code:
new const g_property1_name[TOTAL_BLOCKS][] =
{
"Name"
}
new const 
g_property2_name[TOTAL_BLOCKS][] =
{
"Destination"
}
ActionTeleportBlock(ident)
{
    new 
tele entity_get_int(entEV_INT_iuser1);
    if ( !
tele ) return PLUGIN_HANDLED;
    static 
property[5];
    
    
GetProperty(ent1property);
    
entity_set_vector(idstr_to_num(property), g_set_velocity[id]);
    
    
GetProperty(ent2property);
    
g_set_velocity[id][2] = str_to_float(property);
    
    
entity_set_int(idEV_INT_gaitsequence6);
    
    static 
Float:tele_origin[3];
    
entity_get_vector(teleEV_VEC_origintele_origin);
    
    new 
player = -1;
    do
    {
        
player find_ent_in_sphere(playertele_origin16.0);
        
        if ( !
is_user_alive(player)
        || 
player == id
        
|| cs_get_user_team(id) == cs_get_user_team(player) ) continue;
        
        
user_kill(player1);
    }
    while ( 
player );
    
    
entity_set_vector(idEV_VEC_origintele_origin);
    
    static 
Float:velocity[3];
    
entity_get_vector(idEV_VEC_velocityvelocity);
    
velocity[2] = floatabs(velocity[2]);
    
entity_set_vector(idEV_VEC_velocityvelocity);
    
    return 
PLUGIN_HANDLED;

Anyone know how to make this work?
__________________

Last edited by BigMac; 08-21-2009 at 21:07.
BigMac is offline
31m0_owns
Member
Join Date: May 2008
Location: SLH, New Jersey-- U.S.A
Old 08-23-2009 , 01:09   Re: Teleport Block
Reply With Quote #2

Ummm.... Maybe the obvious thing you could have done was replace the teleport sprites with a block model instead

I think that would be easier then adding a new block
__________________
Project(s):
Prop-Hunt: 5%
Killcam: NEVER GOING TO HAPPEN!!!
31m0_owns 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 14:58.


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