This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

My pie doesn't give me health


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zapdos1
BANNED
Join Date: Jul 2009
Location: Chile - La Serena
Old 07-04-2010 , 12:28   My pie doesn't give me health
Reply With Quote #1

well, my pie doesn't give me health
someone could check my code?
(pie in spanish is pastel)

PHP Code:
new PieModel[] = "models/pastel.mdl"

public plugin_precache()
{
    
precache_model(PieModel)
}

public 
plugin_init()
{
    
RegisterHam(Ham_Killed"player""PieAppears")
    
register_touch"Pie""player""PieTouch" )
}

public 
PieAppearsVictimAttackerShouldGib )
{
    new 
Float:Origin[3]
    new 
Float:Velocidad[3]
    
    new 
Entidad create_entity"info_target" )
    new 
Team get_user_teamVictim )
    
    
entity_get_vectorVictimEV_VEC_originOrigin )
    
entity_set_stringEntidadEV_SZ_classname"Pie" )
    
entity_set_modelEntidadPieModel )
    
    
entity_set_edictEntidadEV_ENT_ownerVictim )
    
entity_set_intEntidadEV_INT_iuser1Team )
    
entity_set_intEntidadEV_INT_iuser2Victim )
    
    
entity_set_sizeEntidadFloat:{ -10.0, -10.0, -0.0 },  Float:{ 10.010.00.0 } )
    
entity_set_originEntidadOrigin )
    
    
entity_set_intEntidadEV_INT_solidSOLID_TRIGGER )
    
    
entity_get_vectorVictimEV_VEC_velocityVelocidad )
    
entity_set_vectorEntidadEV_VEC_velocityVelocidad )
    
    
entity_set_floatEntidadEV_FL_nextthinkget_gametime( ) + 1.0 )
    
    return 
HAM_HANDLED
}

public 
PieTouch(identidad)
{
    if(!
is_user_alive(id))
        return 
PLUGIN_HANDLED
    
    
new Entidad create_entity("info_target")
    
    if( 
entity_get_edict(EntidadEV_ENT_owner))
        return 
PLUGIN_HANDLED
    
    set_user_health
(id100)
    
    return 
PLUGIN_HANDLED

Zapdos1 is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 07-04-2010 , 13:14   Re: My pie doesn't give me health
Reply With Quote #2

Is it being catched by the player who died? If so, the problem is that when you are the owner of an object it is not solid for you.
__________________
joaquimandrade is offline
Zapdos1
BANNED
Join Date: Jul 2009
Location: Chile - La Serena
Old 07-04-2010 , 13:58   Re: My pie doesn't give me health
Reply With Quote #3

Quote:
Originally Posted by joaquimandrade View Post
Is it being catched by the player who died? If so, the problem is that when you are the owner of an object it is not solid for you.
ok, thanks
Zapdos1 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 19:51.


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