Raised This Month: $ Target: $400
 0% 

Plugin event HOOKdeathmessage error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 06-29-2010 , 16:18   Plugin event HOOKdeathmessage error
Reply With Quote #1

I'm trying to edit plugin Hns Shop to Deathrun Shop [$ without points]

work perfectly, but also I see in error_log this message:

PHP Code:
L 08/27/2009 23:10:44: [AMXXDisplaying debug trace (plugin "Deathrun_Shop.amxx")
L 08/27/2009 23:10:44: [AMXXRun time error 4index out of bounds 
L 08
/27/2009 23:10:44: [AMXX]    [041590.attach::Hook_Deathmessage (line 449
don't see [line] because I removed any comments..

bus I think this event doesn't work perfectly in deathrun mod :F [trigger_hurt kill and worldspawn..]

PHP Code:
//// DR_Shop.sma
// Header size:           2476 bytes
// Code size:            29812 bytes
// Data size:            13720 bytes
// Stack/heap size:      16384 bytes; estimated max. usage=781 cells (3124 bytes
)
// Total requirements:   62392 bytes
// Done.
//
// Compilation Time: 0,7 sec
// ---------------------------------------- 
PHP Code:
/* --| Event when player died */
public Hook_Deathmessage()
{
    
/* --| If plugin is on... */
    
if( get_pcvar_numgDrShopOn ) == )
    {
        
/* --| Get the killer and attacker */
        
new killer read_data);
        new 
victim read_data);

        
/* --| If player has died with world / trigger_hurt */
        
if( killer == victim )
        {
            return 
PLUGIN_HANDLED;
        }
        if ( 
is_user_bot(victim) )
        {
            return 
PLUGIN_HANDLED;
        }
        if ( 
is_user_bot(killer) )
        {
            return 
PLUGIN_HANDLED;
        }
        if ( !
is_user_connected(killer) )
        {
            return 
PLUGIN_HANDLED;
        }
        if ( !
is_user_connected(victim) )
        {
            return 
PLUGIN_HANDLED;
        }
        
        
/* --| Setting killer points when killed a enemy */
        
new money cs_get_user_money(killer);
        
cs_set_user_money(killermoney+get_pcvar_numgKillerPointsCvar ) );
    
        
/* --| Reseting items */
        
HasHevictim ] = false;
        
HasBothGrenvictim ] = false;
        
HasSilentvictim ] = false;
        
HasHealthvictim ] = false;
        
HasArmorvictim ] = false;
        
HasSpeedvictim ] = false;
        
HasGravityvictim ] = false;
        
HasInvisvictim ] = false;
        
HasNoclipvictim ] = false;
        
HasJetvictim ] = false;
        
HasDeaglevictim ] = false;
        
//HasLongJump[ victim ] = false;
        
HasGlowvictim ] = false;
        
HasNVGvictim ] = false;
        
        
set_user_gravityvictim1.0 );    
        
set_user_maxspeedvictim0.0 );
        
set_user_footstepsvictim);
        
set_user_noclipvictim);
        
set_user_renderingvictim );
        
set_user_nvgvictim);
        
remove_user_nvgvictim );
        
remove_taskvictim );
    }
    
    return 
PLUGIN_CONTINUE;

and other question to masters , what is better to use fakemeta or <engine> , e.g to create/edit/remove new entities.?
Attached Files
File Type: sma Get Plugin or Get Source (Dr_shop.sma - 648 views - 29.9 KB)

Last edited by AngeIII; 10-17-2012 at 17:25. Reason: [delete]information add
AngeIII is offline
Send a message via Skype™ to AngeIII
 


Thread Tools
Display Modes

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:51.


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