Raised This Month: $12 Target: $400
 3% 

[ZP] Candle Bomb Error en logs


  
 
 
Thread Tools Display Modes
Author Message
leonard19941
Veteran Member
Join Date: Jun 2011
Old 09-03-2012 , 19:53   [ZP] Candle Bomb Error en logs
#1

Bueno estoy utilizando el plugin llamado 'Candle Bomb', pero mire logs y me da unos errors, me podrian ayudar a areglarlo, gracis.


Quote:
L 09/04/2012 - 017:02: Start of error session.
L 09/04/2012 - 017:02: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20120904.log")
L 09/04/2012 - 017:02: [ENGINE] Invalid entity 101
L 09/04/2012 - 017:02: [AMXX] Displaying debug trace (plugin "zp_extraitem_candlebomb.amxx")
L 09/04/2012 - 017:02: [AMXX] Run time error 10: native error (native "entity_get_string")
L 09/04/2012 - 017:02: [AMXX] [0] zp_extraitem_candlebomb.sma::TouchEntity (line 253)

Candle Bomb

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <chatcolor>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <zombieplague>

#define VERSION "1.2"

new iTrailColor] = 

    
230// R
    
230// G
    
230 // B
};

new 
g_iItemId;

new const 
szItemName[ ] = { "Candle Bomb" };
const 
szItemCost 30;

new const 
szEnt_CandleBomb[ ] = "candle_bomb";

new 
g_iTrailSpr;
new const 
szSprite_GrenadeTrail[ ] = "sprites/laserbeam.spr";

new 
g_iRedFlareSprg_iBlueFlareSpr;
new const 
szSprite_RedFlare[ ] = "sprites/redflare2.spr";
new const 
szSprite_BlueFlare[ ] = "sprites/blueflare2.spr";

new 
g_iCandleAmmo33 ] = 0;

public 
plugin_init( )

    
register_plugin"[ZP] Extra Item: Candle Bomb"VERSION"Enigmaya" );
    
    
g_iItemId zp_register_extra_itemszItemNameszItemCostZP_TEAM_HUMAN );
    
    
register_forwardFM_PlayerPreThink"Fw_PlayerPreThink" );
    
    
register_event"HLTV""Ev_HLTV""a""1=0""2=0" );
    
register_event"ResetHUD""Ev_ResetHUD""b" );
    
    
register_touch"""""TouchEntity" );


public 
plugin_precache( )
{
    
precache_sound"debris/beamstart15.wav" );
    
    
precache_sound"weapons/rocketfire1.wav" );
    
precache_model"models/rpgrocket.mdl" );
    
    
g_iRedFlareSpr precache_modelszSprite_RedFlare );
    
g_iBlueFlareSpr precache_modelszSprite_BlueFlare );
    
    
g_iTrailSpr precache_modelszSprite_GrenadeTrail );


public 
client_connectid )
    
g_iCandleAmmoid ] = 0;

public 
zp_extra_item_selectedidiItemId )
{
    if( 
iItemId == g_iItemId )
    {
        if( 
g_iCandleAmmoid ] )
            
ChatColorid, DEFAULT, "^x04[ Candle Bomb ] ^x01Ya tienes una ^x04Candle Bomb^x01!!" );
        else
        {
            
g_iCandleAmmoid ] += 1;
            
ChatColorid, DEFAULT, "^x04[ Candle Bomb ] ^x01Has comprado una^x04 Candle Bomb^x01, pulsa ^x04MOUSE2 [+ATTACK2] ^x01para lanzarla!!" );
        }
    }
}

public 
zp_user_infected_postidiInfector )
{
    if( 
g_iCandleAmmoid ] )
        
g_iCandleAmmoid ] = false;
}

public 
Fw_PlayerPreThinkid )
{
    new 
iButton pevidpev_button )
    new 
iOldButton pevidpev_oldbuttons )
    
    if( 
iOldButton IN_ATTACK2 && !( iButton IN_ATTACK2 ) )
        
CreateEntityid )
    
    return 
PLUGIN_CONTINUE;
}

public 
CreateEntityid )
{
    if( !
is_user_aliveid ) || zp_get_user_zombieid ) || !g_iCandleAmmoid ] )
        return 
PLUGIN_HANDLED;
    
    if( 
get_user_weaponid ) == CSW_KNIFE 
    
|| get_user_weaponid ) == CSW_FLASHBANG 
    
|| get_user_weaponid ) == CSW_HEGRENADE 
    
|| get_user_weaponid ) == CSW_SMOKEGRENADE 
    
|| get_user_weaponid ) == CSW_C4 )
    return 
PLUGIN_HANDLED;
    
    
entity_set_intidEV_INT_effects);
    
entity_set_intidEV_INT_light_level);
    
    new 
FloatfAngle], iOrigin], FloatfPlayerOrigin], FloatfPlayerVelocity];
    
    
entity_get_vectoridEV_VEC_originfPlayerOrigin );
    
    
get_user_originidiOrigin);
    
    
velocity_by_aimid16fPlayerVelocity )
    
iOrigin] += floatroundfPlayerVelocity] )
    
iOrigin] += floatroundfPlayerVelocity] )
    
iOrigin] += floatroundfPlayerVelocity] )
    
    
ShootFireiOrigin )
    
    if( 
ViewContentsid ) == CONTENTS_SKY )
    {
        new 
iCandleEnt create_entity"info_target" );
        
        if( !
is_valid_entiCandleEnt ) )
            return 
PLUGIN_HANDLED;
        
        
entity_set_stringiCandleEntEV_SZ_classnameszEnt_CandleBomb );
        
entity_set_modeliCandleEnt"models/rpgrocket.mdl" );
        
entity_set_originiCandleEntfPlayerOrigin );
        
        
entity_set_intiCandleEntEV_INT_solid);
        
entity_set_edictiCandleEntEV_ENT_ownerid );
        
        
entity_set_intiCandleEntEV_INT_movetype);
        
        
entity_set_intiCandleEntEV_INT_effects);
        
        
VelocityByAimid600fPlayerVelocity );
        
vector_to_anglefPlayerVelocityfAngle );
        
entity_set_vectoriCandleEntEV_VEC_anglesfAngle );
        
entity_set_vectoriCandleEntEV_VEC_velocityfPlayerVelocity );
        
        
message_beginMSG_BROADCASTSVC_TEMPENTITY )
        
write_byte22 )
        
write_shortiCandleEnt )
        
write_shortg_iTrailSpr )
        
write_byte)
        
write_byte)
        
write_byteiTrailColor] ) // R
        
write_byteiTrailColor] ) // G
        
write_byteiTrailColor] ) // B
        
write_byte128 // Brightness.
        
message_end( )
        
        
emit_soundid,CHAN_BODY"weapons/rocketfire1.wav"1.0ATTN_NORM0PITCH_NORM );
    }
    else
    {
        new 
iSlowLight create_entity"info_target" );
        
        if( !
is_valid_entiSlowLight ) )
            return 
PLUGIN_HANDLED;
        
        
entity_set_stringiSlowLightEV_SZ_classname"slow_light" );
        
entity_set_modeliSlowLight"models/rpgrocket.mdl" );
        
        
entity_set_originiSlowLightfPlayerOrigin );
        
        
entity_set_intiSlowLight,EV_INT_solid);
        
entity_set_edictiSlowLight,EV_ENT_ownerid );
        
        
entity_set_intiSlowLightEV_INT_movetype);
        
        
entity_set_intiSlowLightEV_INT_effects);
        
        
VelocityByAimid200fPlayerVelocity );
        
        if( 
fPlayerVelocity]<=-100.0 )
            
RemoveEntityiSlowLight );
        
        
fPlayerVelocity] = 0.0;
        
vector_to_anglefPlayerVelocityfAngle );
        
entity_set_vectoriSlowLightEV_VEC_anglesfAngle );
        
entity_set_vectoriSlowLightEV_VEC_velocityfPlayerVelocity );
        
        
emit_soundidCHAN_BODY"debris/beamstart15.wav"1.0ATTN_NORM0PITCH_NORM );
        
        
set_task30.0,"RemoveEntity"iSlowLight );
    }
    
g_iCandleAmmoid ] = 0;
    
    return 
PLUGIN_HANDLED;
}

ShootFireiOrigin] )
{
    
iOrigin]+=10;
    
iOrigin]+=10;
    
MsgiOrigin )
    
iOrigin]-=10;
    
iOrigin]-=10;
    
MsgiOrigin )
    
iOrigin]+=10;
    
iOrigin]-=10;
    
MsgiOrigin )
    
iOrigin]-=10;
    
iOrigin]+=10;
    
MsgiOrigin )
}

MsgiOrigin] )
{
    
message_beginMSG_BROADCAST,SVC_TEMPENTITY );
    
write_byte);
    
write_coordiOrigin] );
    
write_coordiOrigin] );
    
write_coordiOrigin] );
    
message_end( );
}

public 
RemoveEntityiEnt )
{
    if( 
is_valid_entiEnt ) )
        
    
remove_entityiEnt );
}

public 
Ev_HLTV( )
{
    for( new 
idid <= 32id++ )
        
g_iCandleAmmoid ] = false;
}

public 
Ev_ResetHUDid )
{
    if( !
is_user_aliveid ) || zp_get_user_zombieid ) )
        return 
PLUGIN_HANDLED;
    
    
g_iCandleAmmoid ] = 1
    
    
return PLUGIN_HANDLED;
}

public 
TouchEntityiTouchediToucher )
{
    new 
iClassName32 ];
    
    if( 
iToucher )
        
entity_get_stringiToucherEV_SZ_classnameiClassNamecharsmaxiClassName ) );
    
    if( 
equaliClassNameszEnt_CandleBomb ) )
    {
        new 
FloatfFlashOrigin];
        
entity_get_vectoriToucherEV_VEC_originfFlashOrigin );
        
        
remove_entityiToucher );
        
        new 
iSpr;
        if( 
random_num0) )
            
iSpr g_iRedFlareSpr;
        else
            
iSpr g_iBlueFlareSpr;
        
        
message_beginMSG_BROADCASTSVC_TEMPENTITY );
        
write_byte);
        
write_coordfloatroundfFlashOrigin] ) );
        
write_coordfloatroundfFlashOrigin] ) );
        
write_coordfloatroundfFlashOrigin] ) );
        
message_end( );
        
        
message_beginMSG_BROADCASTSVC_TEMPENTITY );
        
write_byte15 );
        
write_coordfloatroundfFlashOrigin] ) );
        
write_coordfloatroundfFlashOrigin] ) );
        
write_coordfloatroundfFlashOrigin] ) -);
        
write_coordfloatroundfFlashOrigin] ) );
        
write_coordfloatroundfFlashOrigin] ) );
        
write_coordfloatroundfFlashOrigin] ) );
        
write_shortiSpr );
        
write_byte);
        
write_byte55 );
        
write_byte100 );
        
write_byte);
        
write_byte);
        
message_end( );
        
        
message_beginMSG_BROADCASTSVC_TEMPENTITY );
        
write_byte27 );
        
write_coordfloatroundfFlashOrigin] ) );
        
write_coordfloatroundfFlashOrigin] ) );
        
write_coordfloatroundfFlashOrigin] ) );
        
write_byte200 );
        
write_byte230 );
        
write_byte230 );
        
write_byte230 );
        
write_byte100 );
        
write_byte10 );
        
message_end( );
    }
    else if( 
equaliClassName"slow_light" ) )
        
remove_entityiToucher );
}

public 
client_disconnectid )
    
g_iCandleAmmoid ] = 0
Attached Files
File Type: sma Get Plugin or Get Source (zp_extraitem_candlebomb.sma - 545 views - 7.9 KB)
__________________

Last edited by leonard19941; 09-03-2012 at 19:58.
leonard19941 is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 09-03-2012 , 20:46   Re: [ZP] Candle Bomb Error en logs
#2

Chequee con pev_valid aver cual es su resultado.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
leonard19941
Veteran Member
Join Date: Jun 2011
Old 09-03-2012 , 20:54   Re: [ZP] Candle Bomb Error en logs
#3

Quote:
Originally Posted by lucas_7_94 View Post
Chequee con pev_valid aver cual es su resultado.
Dices esto?

PHP Code:
if( iToucher )
        
entity_get_stringiToucherEV_SZ_classnameiClassNamecharsmaxiClassName ) ); 


PHP Code:
if( !pev_validiToucher ) )
        
entity_get_stringiToucherEV_SZ_classnameiClassNamecharsmaxiClassName ) ); 
__________________
leonard19941 is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 09-03-2012 , 21:06   Re: [ZP] Candle Bomb Error en logs
#4

Si , excepto sin el negador.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
LBCoscu
BANNED
Join Date: Aug 2012
Location: Santiago
Old 09-03-2012 , 21:43   Re: [ZP] Candle Bomb Error en logs
#5

Disculpa de que se trata esta bomba?
LBCoscu is offline
Send a message via MSN to LBCoscu
leonard19941
Veteran Member
Join Date: Jun 2011
Old 09-04-2012 , 08:31   Re: [ZP] Candle Bomb Error en logs
#6

Quote:
Originally Posted by lucas_7_94 View Post
Si , excepto sin el negador.
Ok, voy a probar.

Quote:
Originally Posted by LBCoscu View Post
Disculpa de que se trata esta bomba?
Description :

Enables to purchase the bomb (flare) of candle which you can start, to light up a place.

What an effect was it is necessary to shoot upwards !

Press on attack2 , to see it : )

Scrinshot :


!!! WARNING !!! This plugin crashes any server.

I will not be able to correct the problem, i do not know what the reason is...
If someone can get it to work, ill thank you : )
__________________
leonard19941 is offline
 


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 05:13.


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