Raised This Month: $ Target: $400
 0% 

ExecuteHamB, inflictor.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 01-25-2010 , 14:04   ExecuteHamB, inflictor.
Reply With Quote #1

When I create an entity and player is killed it writes : killed with "worldspawn" , why?
My weaponDescription[] for example is 'mega_knife'

PHP Code:
public Dmg_Kill_Player(idattackerFloat:damageweaponDescription[])
{
    if( 
is_user_alive(attacker) ) 
    {
        new 
Ent create_entity(weaponDescription);
        
ExecuteHamBHam_TakeDamageidEntattackerdamageDMG_GENERIC );
        
remove_entity(Ent);
    }

__________________

Last edited by xbatista; 01-25-2010 at 14:09.
xbatista is offline
Send a message via Skype™ to xbatista
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-25-2010 , 14:13   Re: ExecuteHamB, inflictor.
Reply With Quote #2

Because you cant create an entity with a custom classname, so the ent is not created.
Create a info_target, and then alter the classname.
Actually you pass Ent == 0 == world.

If you need this at different places in your plugin and with different classes you can use this stock :

PHP Code:
create_custom_entity(const weaponDescription[])
{
    new 
iEnt create_entity("info_target")
    if( 
iEnt )
    {
        
set_pev(iEntpev_classnameweaponDescription)
    }
    return 
iEnt

Then :

new Ent = create_custom_entity(weaponDescription);
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 01-25-2010 at 14:15.
ConnorMcLeod is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-25-2010 , 14:14   Re: ExecuteHamB, inflictor.
Reply With Quote #3

You can't use create_entity() with an invalid entity classname.

EDIT: Hi, Connor
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 01-25-2010, 14:15
xbatista
This message has been deleted by xbatista. Reason: ops
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 01-25-2010 , 14:21   Re: ExecuteHamB, inflictor.
Reply With Quote #4

Thanks and:

PHP Code:
public Dmg_Kill_Player(idattackerFloat:damageweaponDescription[])
{
    if( 
is_user_alive(attacker) ) 
    {
        new 
FakeEnt create_entity("info_target");
        
entity_set_stringFakeEntEV_SZ_classnameweaponDescription)
        
ExecuteHamBHam_TakeDamageidFakeEntattackerdamageDMG_GENERIC );
        
remove_entity(FakeEnt);
     }

Client's cs 1.6 stucks with this code

EDIT: I used your type Connor, same, client's cs freezes.
Omg why?
__________________

Last edited by xbatista; 01-25-2010 at 14:38.
xbatista is offline
Send a message via Skype™ to xbatista
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-25-2010 , 15:21   Re: ExecuteHamB, inflictor.
Reply With Quote #5

Probably because you have an infine loop. Dmg_Kill_Player is called from TakeDamage?
__________________
Arkshine is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 01-25-2010 , 15:24   Re: ExecuteHamB, inflictor.
Reply With Quote #6

just edit death_msg if you want custom kill message ( not icon )
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 01-25-2010 , 15:52   Re: ExecuteHamB, inflictor.
Reply With Quote #7

No Arkshine.
Owyn I don't need it ^^

Btw this Dmg_Kill_Player registered as native ,3-rd parameter is 1 ^_^
I will remove it as native tommorow and try without it, now I go sleep.
And yes 'xbatista killed PODBOT[100] with t.mdl' ... I tested now with non-steam, btw I have that model precached, what the hell happens...
With non-steam no crash, with steam crashes the client's cs
__________________
xbatista is offline
Send a message via Skype™ to xbatista
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-25-2010 , 16:38   Re: ExecuteHamB, inflictor.
Reply With Quote #8

Quote:
Originally Posted by xbatista View Post
No Arkshine.
Owyn I don't need it ^^

Btw this Dmg_Kill_Player registered as native ,3-rd parameter is 1 ^_^
I will remove it as native tommorow and try without it, now I go sleep.
And yes 'xbatista killed PODBOT[100] with t.mdl' ... I tested now with non-steam, btw I have that model precached, what the hell happens...
With non-steam no crash, with steam crashes the client's cs
You would have better no talk about nosteam, even if you are using it for testing purpose.
What happens if you don't remove the custom ent ? (you may create 1 at map start, and alter its classname when you need to use it)
Also, try to set pev_owner to attacker, it may help for the death msg.

And like arkshine said, to be sure, try also with ExecuteHam and not ExecuteHamB
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 01-25-2010 , 19:29   Re: ExecuteHamB, inflictor.
Reply With Quote #9

@xbatista

You better edit that before yami captures your crab.
01101101 is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 01-25-2010 , 20:04   Re: ExecuteHamB, inflictor.
Reply With Quote #10

Ok Connor will try.
About non-steam is for testing purpose.
__________________
xbatista is offline
Send a message via Skype™ to xbatista
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 18:17.


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