Raised This Month: $ Target: $400
 0% 

Run time error 1


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-11-2022 , 00:25   Run time error 1
Reply With Quote #1

Code:
L 05/10/2022 - 18:46:03: Start of error session.
L 05/10/2022 - 18:46:03: Info (map "jb_oasis") (file "addons/amxmodx/logs/error_20220510.log")
L 05/10/2022 - 18:46:03: [AMXX] Plugin ("jb_parachute.amxx") is setting itself as failed.
L 05/10/2022 - 18:46:03: [AMXX] Plugin says:  jb_oasis
L 05/10/2022 - 18:46:03: [AMXX] Run time error 1 (plugin "jb_parachute.amxx") - forced exit
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <engine>
#include <cstrike>
#include <fun>
#include <jailbreak_core>

#if AMXX_VERSION_NUM > 182
#define client_disconnect client_disconnected
#endif

new bool:g_has_parachute[33], g_IsUserAlive;
new 
g_para_ent[33];
new 
g_pDetachg_pFallSpeedg_p_shopitem_para;

#define PARACHUTE_LEVEL ADMIN_LEVEL_A

public plugin_init()
{
    
register_plugin("[JB] Parachute""1.0""Natsheh");
    
g_pFallSpeed register_cvar("parachute_fallspeed""100");
    
g_pDetach register_cvar("parachute_detach""1");

    
register_concmd("amx_parachute""admin_give_parachute"PARACHUTE_LEVEL"<nick, #userid or @team>" );

    
register_event("DeathMsg""death_event""a");
    
RegisterHam(Ham_Spawn"player""newSpawn"true);

    
g_p_shopitem_para register_jailbreak_shopitem("Parachute""Smoothes the landing"5000TEAM_ANY);
}

public 
jb_shop_item_preselect(iditemid)
{
    if(
g_p_shopitem_para == itemid)
    {
        if(
g_has_parachuteid ]) return JB_MENU_ITEM_UNAVAILABLE;
    }

    return 
JB_IGNORED;
}

public 
jb_shop_item_bought(iditemid)
{
    if(
g_p_shopitem_para == itemid)
    {
        
g_has_parachuteid ] = true;
    }
}

public 
plugin_precache()
{
    
precache_model("models/parachute.mdl");
}

public 
client_connect(id)
{
    
parachute_reset(id)
}

public 
client_disconnect(id)
{
    
parachute_reset(id)
}

public 
death_event()
{
    const 
VICTIM_ARGUMENT 2;
    new 
iVictim read_dataVICTIM_ARGUMENT );
    
remove_flag(g_IsUserAlive,iVictim);
    
parachute_resetiVictim );
}

parachute_reset(id)
{
    new 
parachute g_para_ent[id];

    if(
parachute 0)
    {
        
entity_set_int(parachuteEV_INT_flagsFL_KILLME);
        
call_think(parachute);
    }

    
g_has_parachute[id] = false;
    
g_para_ent[id] = 0;
}

public 
newSpawn(id)
{
    if(!
is_user_alive(id)) return;

    
set_flag(g_IsUserAlive,id);

    new 
parachute g_para_ent[id];

    if(
parachute 0)
    {
        
entity_set_int(parachuteEV_INT_flagsFL_KILLME);
        
call_think(parachute);
        
g_para_ent[id] = 0;
    }

    if ( 
access(idPARACHUTE_LEVEL) )
    {
        
g_has_parachute[id] = true;
    }
}

public 
admin_give_parachute(idlevelcid) {

    if(!
cmd_access(id,level,cid,2)) return PLUGIN_HANDLED

    
new arg[32], name[32], authid[35];
    
read_argv(1,arg,31);
    
get_user_name(id,name,31);
    
get_user_authid(id,authid,34);

    if (
arg[0]=='@')
    {
        new 
players[32], inum;
        switch ( 
arg[1] )
        {
            case 
'T'get_players(playersinum"he""TERRORIST");
            case 
'C'get_players(playersinum"he""CT");
            default :    
get_players(playersinum"h");
        }

        if (
inum == 0) {
            
console_print(id,"No clients in such team");
            return 
PLUGIN_HANDLED;
        }

        for(new 
0inuma++)
        {
            
g_has_parachuteplayers[a] ] = true;
        }

        switch(
get_cvar_num("amx_show_activity")) {
            case 
2:    client_print(0,print_chat,"ADMIN %s: gave a parachute to ^"%s^" players",name,arg[1])
            case 
1:    client_print(0,print_chat,"ADMIN: gave a parachute to ^"%s^" players",arg[1])
        }

        
console_print(id,"[AMXX] You gave a parachute to ^"%s^" players",arg[1])
        
log_amx("^"%s<%d><%s><>^" gave a parachute to ^"%s^""name,get_user_userid(id),authid,arg[1])
    }
    else
    {
        new 
player cmd_target(idargCMDTARGET_ALLOW_SELF)
        if (!
player) return PLUGIN_HANDLED;

        
g_has_parachute[player] = true;

        new 
authid2[35], name2[32];
        
get_user_name(player,name2,31);
        
get_user_authid(player,authid2,34);

        switch(
get_cvar_num("amx_show_activity")) {
            case 
2:    client_print(0,print_chat,"ADMIN %s: gave a parachute to ^"%s^"",name,name2)
            case 
1:    client_print(0,print_chat,"ADMIN: gave a parachute to ^"%s^"",name2)
        }

        
console_print(id,"[AMXX] You gave a parachute to ^"%s^""name2)
        
log_amx("^"%s<%d><%s><>^" gave a parachute to ^"%s<%d><%s><>^""name,get_user_userid(id),authid,name2,get_user_userid(player),authid2)
    }
    return 
PLUGIN_HANDLED
}

public 
client_PreThink(id)
{
    
//parachute.mdl animation information
    //0 - deploy - 84 frames
    //1 - idle - 39 frames
    //2 - detach - 29 frames

    
if (!check_flag(g_IsUserAlive,id) || !g_has_parachute[id]) return;

    static 
buttonoldbuttonflagsFloat:fFrame 0.0;
    
button get_user_button(id);
    
oldbutton get_user_oldbutton(id);
    
flags get_entity_flags(id);

    static 
para_ent 0;
    
para_ent g_para_ent[id];

    if (
para_ent && (flags FL_ONGROUND)) {

        static 
bDetach 0bDetach = !bDetach get_pcvar_num(g_pDetach):bDetach;
        if (
bDetach)
        {

            if (
entity_get_int(para_ent,EV_INT_sequence) != 2) {
                
entity_set_int(para_entEV_INT_sequence2);
                
entity_set_int(para_entEV_INT_gaitsequence1);
                
entity_set_float(para_entEV_FL_frame0.0);
                
entity_set_float(para_entEV_FL_fuser10.0);
                
entity_set_float(para_entEV_FL_animtime0.0);
                
entity_set_float(para_entEV_FL_framerate0.0);
                return
            }

            
fFrame entity_get_float(para_ent,EV_FL_fuser1) + 2.0;
            
entity_set_float(para_ent,EV_FL_fuser1,fFrame);
            
entity_set_float(para_ent,EV_FL_frame,fFrame);

            if (
fFrame 254.0)
            {
                
entity_set_int(para_entEV_INT_flagsFL_KILLME);
                
call_think(para_ent);
                
g_para_ent[id] = 0;
            }
        }
        else
        {
            
entity_set_int(para_entEV_INT_flagsFL_KILLME);
            
call_think(para_ent);
            
g_para_ent[id] = 0;
        }

        return
    }

    if (
button IN_USE)
    {
        static 
Float:fFallspeed 0.0Float:velocity[3]; fFallspeed = (fFallspeed == 0.0) ? ( -get_pcvar_float(g_pFallSpeed) ) : fFallspeed;
        
entity_get_vector(idEV_VEC_velocityvelocity)

        if (
velocity[2] < 0.0) {

            if(
para_ent <= 0) {
                
para_ent create_entity("info_target")
                if(
para_ent 0)
                {
                    
g_para_ent[id] = para_ent;
                    
entity_set_string(para_ent,EV_SZ_classname,"parachute");
                    
entity_set_edict(para_entEV_ENT_aimentid);
                    
entity_set_edict(para_entEV_ENT_ownerid);
                    
entity_set_int(para_entEV_INT_movetypeMOVETYPE_FOLLOW);
                    
entity_set_model(para_ent"models/parachute.mdl");
                    
entity_set_int(para_entEV_INT_sequence0);
                    
entity_set_int(para_entEV_INT_gaitsequence1);
                    
entity_set_float(para_entEV_FL_frame0.0);
                    
entity_set_float(para_entEV_FL_fuser10.0);
                }
            }

            if (
para_ent 0) {

                
entity_set_int(idEV_INT_sequence3)
                
entity_set_int(idEV_INT_gaitsequence1)
                
entity_set_float(idEV_FL_frame1.0)
                
entity_set_float(idEV_FL_framerate1.0)

                
velocity[2] = (velocity[2] + 40.0 fFallspeed) ? velocity[2] + 40.0 fFallspeed
                entity_set_vector
(idEV_VEC_velocityvelocity)

                if (
entity_get_int(para_ent,EV_INT_sequence) == 0) {

                    
fFrame entity_get_float(para_ent,EV_FL_fuser1) + 1.0
                    entity_set_float
(para_ent,EV_FL_fuser1,fFrame)
                    
entity_set_float(para_ent,EV_FL_frame,fFrame)

                    if (
fFrame 100.0) {
                        
entity_set_float(para_entEV_FL_animtime0.0)
                        
entity_set_float(para_entEV_FL_framerate0.4)
                        
entity_set_int(para_entEV_INT_sequence1)
                        
entity_set_int(para_entEV_INT_gaitsequence1)
                        
entity_set_float(para_entEV_FL_frame0.0)
                        
entity_set_float(para_entEV_FL_fuser10.0)
                    }
                }
            }
        }
        else if (
para_ent 0) {
            
entity_set_int(para_entEV_INT_flagsFL_KILLME);
            
call_think(para_ent);
            
g_para_ent[id] = 0;
        }
    }
    else if ((
oldbutton IN_USE) && para_ent ) {
        
entity_set_int(para_entEV_INT_flagsFL_KILLME);
        
call_think(para_ent);
        
g_para_ent[id] = 0
    
}

__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 05-11-2022 at 00:26.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
 


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 00:18.


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