AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Spanish (https://forums.alliedmods.net/forumdisplay.php?f=135)
-   -   [ZP] Candle Bomb Error en logs (https://forums.alliedmods.net/showthread.php?t=195130)

leonard19941 09-03-2012 19:53

[ZP] Candle Bomb Error en logs
 
1 Attachment(s)
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 - 01:37:02: Start of error session.
L 09/04/2012 - 01:37:02: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20120904.log")
L 09/04/2012 - 01:37:02: [ENGINE] Invalid entity 101
L 09/04/2012 - 01:37:02: [AMXX] Displaying debug trace (plugin "zp_extraitem_candlebomb.amxx")
L 09/04/2012 - 01:37:02: [AMXX] Run time error 10: native error (native "entity_get_string")
L 09/04/2012 - 01:37: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


lucas_7_94 09-03-2012 20:46

Re: [ZP] Candle Bomb Error en logs
 
Chequee con pev_valid aver cual es su resultado.

leonard19941 09-03-2012 20:54

Re: [ZP] Candle Bomb Error en logs
 
Quote:

Originally Posted by lucas_7_94 (Post 1790806)
Chequee con pev_valid aver cual es su resultado.

Dices esto?

PHP Code:

if( iToucher )
        
entity_get_stringiToucherEV_SZ_classnameiClassNamecharsmaxiClassName ) ); 

:arrow:

PHP Code:

if( !pev_validiToucher ) )
        
entity_get_stringiToucherEV_SZ_classnameiClassNamecharsmaxiClassName ) ); 


lucas_7_94 09-03-2012 21:06

Re: [ZP] Candle Bomb Error en logs
 
Si , excepto sin el negador.

LBCoscu 09-03-2012 21:43

Re: [ZP] Candle Bomb Error en logs
 
Disculpa de que se trata esta bomba?

leonard19941 09-04-2012 08:31

Re: [ZP] Candle Bomb Error en logs
 
Quote:

Originally Posted by lucas_7_94 (Post 1790817)
Si , excepto sin el negador.

Ok, voy a probar.

Quote:

Originally Posted by LBCoscu (Post 1790837)
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 :
http://album.karelia.ru/users/7634/210.jpeg

!!! 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 : )


All times are GMT -4. The time now is 05:54.

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