Raised This Month: $ Target: $400
 0% 

how to prevent registerhamfromentity being called for whole classname


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
avril-lavigne
Banned
Join Date: Apr 2009
Old 11-12-2014 , 06:41   Re: how to prevent registerhamfromentity being called for whole classname
Reply With Quote #1

Ive already tried that

I have Two bots-entities.
look at the log

1st hit produce TWO lines instead of ONE , for EACH entity in the world

L 11/12/2014 - 13:28:09: [soccer.amxx] damage 65.00 victim health 35.00
L 11/12/2014 - 13:28:09: [soccer.amxx] damage 65.00 victim health 35.00

second hit also 2 lines

L 11/12/2014 - 13:28:12: [soccer.amxx] damage 65.00 victim health -30.00
L 11/12/2014 - 13:28:12: [soccer.amxx] damage 65.00 victim health -30.00

So condition below makes TWO entities instead of "killed" one

PHP Code:
public fw_takedamage_ent(victiminflictorattackerFloat:damagedamage_type)
{
  if(
damage >= entity_get_float(victim,EV_FL_health))
 {
              
               
emit_sound(victimCHAN_AUTOdeath_sound[random_num(0sizeof death_sound 1)], 1.0ATTN_NORM0PITCH_NORM)
        switch(
entity_get_int(victimEV_INT_team))
        {
            case 
1:create_bott()
            case 
2:create_botct()
        }
   }

After killing entity I have 4 bots instead of 1
2 calls of forward multiply 2 entities = 4

If I have 4 bots-entities. killing just ONE makes over 8 new bots....

I need to filter just one ent being damaged to prevent multiple fwd calls
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc

Last edited by avril-lavigne; 11-12-2014 at 06:47.
avril-lavigne 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 17:35.


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