Errori inspect

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
Doctor whO? <3
Membru, skill +3
Membru, skill +3
Posts: 1199
Joined: 21 Jun 2013, 12:40
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Reputatie: Fost Membru Club eXtreamCS (doua luni)
Has thanked: 111 times
Been thanked: 76 times
Contact:

15 Jun 2020, 12:59

Salutare,
Am un plugin de inspect si primesc urmatoarele errori la el:
L 06/15/2020 - 12:45:22: [AMXX] Displaying debug trace (plugin "inspect2.amxx", version "3.0")
L 06/15/2020 - 12:45:22: [AMXX] Run time error 10: native error (native "set_pdata_float")
L 06/15/2020 - 12:45:22: [AMXX] [0] inspect2.sma::Inspect_Weapon (line 107)

Sma inspect:
inspect | Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <hamsandwich>

const XoWeapon = 4;
const m_pPlayer = 41;
const m_flTimeWeaponIdle = 48;
const m_fInReload = 54;
const m_pActiveItem = 373;

new g_inspect_toggle[33];

new inspect_anim[] =
{
    0,  //null
    7,  //p228
    0,  //shield
    5,  //scout
    0,  //hegrenade
    7,  //xm1014
    0,  //c4
    6,  //mac10
    6,  //aug
    0,  //smoke grenade
    16, //elites
    6,  //fiveseven
    6,  //ump45
    5,  //sg550
    6,  //galil
    6,  //famas
    16, //usp
    13, //glock
    6,  //awp
    6,  //mp5
    5,  //m249
    7,  //m3
    14, //m4a1
    6,  //tmp
    5,  //g3sg1
    0,  //flashbang
    6,  //deagle
    6,  //sg552
    6,  //ak47
    8,  //knife
    6   //p90
}

new weapon_ent[][] =
{
    "weapon_p228",
    "weapon_scout",
    "weapon_xm1014",
    "weapon_mac10",
    "weapon_aug",
    "weapon_elite",
    "weapon_fiveseven",
    "weapon_ump45",
    "weapon_sg550",
    "weapon_galil",
    "weapon_famas",
    "weapon_usp",
    "weapon_glock18",
    "weapon_awp",
    "weapon_mp5navy",
    "weapon_m249",
    "weapon_m3",
    "weapon_m4a1",
    "weapon_tmp",
    "weapon_g3sg1",
    "weapon_deagle",
    "weapon_sg552",
    "weapon_ak47",
    "weapon_knife",
    "weapon_p90"
}
public plugin_init()
{
    register_plugin("CS:GO Inspect Weapon", "3.0", "hellmonja");
    register_impulse(100, "Inspect_Weapon")

    for(new i = 0; i < sizeof weapon_ent; i++)
        RegisterHam(Ham_Item_Deploy, weapon_ent, "Fw_ItemDeployPost", 1);
}

public Fw_ItemDeployPost(weapon)
{
    static id;
    id = get_pdata_cbase(weapon, m_pPlayer, 4);

    if(!is_user_alive(id))
        return

    remove_task(id);
    g_inspect_toggle[id] = 0;
    set_task(1.0, "Enable_Inspect", id);
}

public Inspect_Weapon(id)
{
    new wpn_id = get_user_weapon(id);

    static weapon;
    weapon = get_pdata_cbase(id, m_pActiveItem);

    set_pdata_float(weapon, m_flTimeWeaponIdle, 7.0, 4);

    new anim;
    switch(wpn_id)
    {
        case CSW_M4A1:
            if(!cs_get_weapon_silen(weapon)) anim = 15;
            else anim = inspect_anim[wpn_id];
        case CSW_USP:
            if(!cs_get_weapon_silen(weapon)) anim = 17;
            else anim = inspect_anim[wpn_id];
        default:
            anim = inspect_anim[wpn_id];
    }

    if(g_inspect_toggle[id] && !get_pdata_int(weapon, m_fInReload, XoWeapon))
        set_pev(id, pev_weaponanim, anim);

    return PLUGIN_HANDLED;
}

public Enable_Inspect(id)
{
    g_inspect_toggle[id] = 1;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
RoyalServer 2
User avatar
JaiLBreaK
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 1517
Joined: 05 Jan 2016, 18:17
Detinator Steam: Nu
Detinator server CS: Da
Reputatie: Membru Club eXtreamCS (2 luni)
Fost Scripter eXtreamCS
Fond eXtream: 0
Has thanked: 5 times
Been thanked: 10 times
Contact:

15 Jun 2020, 15:20

asta e eroarea completa

Code: Select all

L 06/15/2020 - 12:45:22: [FAKEMETA] Invalid entity -1
L 06/15/2020 - 12:45:22: [AMXX] Displaying debug trace (plugin "inspect2.amxx", version "3.0")
L 06/15/2020 - 12:45:22: [AMXX] Run time error 10: native error (native "set_pdata_float")
L 06/15/2020 - 12:45:22: [AMXX]    [0] inspect2.sma::Inspect_Weapon (line 107)
| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <hamsandwich>

const XoWeapon = 4;
const m_pPlayer = 41;
const m_flTimeWeaponIdle = 48;
const m_fInReload = 54;
const m_pActiveItem = 373;

new g_inspect_toggle[33];

new inspect_anim[] =
{
    0,  //null
    7,  //p228
    0,  //shield
    5,  //scout
    0,  //hegrenade
    7,  //xm1014
    0,  //c4
    6,  //mac10
    6,  //aug
    0,  //smoke grenade
    16, //elites
    6,  //fiveseven
    6,  //ump45
    5,  //sg550
    6,  //galil
    6,  //famas
    16, //usp
    13, //glock
    6,  //awp
    6,  //mp5
    5,  //m249
    7,  //m3
    14, //m4a1
    6,  //tmp
    5,  //g3sg1
    0,  //flashbang
    6,  //deagle
    6,  //sg552
    6,  //ak47
    8,  //knife
    6   //p90
}

new weapon_ent[][] =
{
    "weapon_p228",
    "weapon_scout",
    "weapon_xm1014",
    "weapon_mac10",
    "weapon_aug",
    "weapon_elite",
    "weapon_fiveseven",
    "weapon_ump45",
    "weapon_sg550",
    "weapon_galil",
    "weapon_famas",
    "weapon_usp",
    "weapon_glock18",
    "weapon_awp",
    "weapon_mp5navy",
    "weapon_m249",
    "weapon_m3",
    "weapon_m4a1",
    "weapon_tmp",
    "weapon_g3sg1",
    "weapon_deagle",
    "weapon_sg552",
    "weapon_ak47",
    "weapon_knife",
    "weapon_p90"
}
public plugin_init()
{
    register_plugin("CS:GO Inspect Weapon", "3.0", "hellmonja");
    register_impulse(100, "Inspect_Weapon")

    for(new i = 0; i < sizeof weapon_ent; i++)
        RegisterHam(Ham_Item_Deploy, weapon_ent [ i ] , "Fw_ItemDeployPost", 1);
}

public Fw_ItemDeployPost(weapon)
{
    static id;
    id = get_pdata_cbase(weapon, m_pPlayer, 4);

    if(!is_user_alive(id))
        return

    remove_task(id);
    g_inspect_toggle[id] = 0;
    set_task(1.0, "Enable_Inspect", id);
}

public Inspect_Weapon(id)
{
    new wpn_id = get_user_weapon(id);
 
    static weapon;
    weapon = get_pdata_cbase(id, m_pActiveItem);
    if(!pev_valid(weapon))
        return PLUGIN_HANDLED;

    set_pdata_float(weapon, m_flTimeWeaponIdle, 7.0, 4);

    new anim;
    switch(wpn_id)
    {
        case CSW_M4A1:
            if(!cs_get_weapon_silen(weapon)) anim = 15;
            else anim = inspect_anim[wpn_id];
        case CSW_USP:
            if(!cs_get_weapon_silen(weapon)) anim = 17;
            else anim = inspect_anim[wpn_id];
        default:
            anim = inspect_anim[wpn_id];
    }

    if(g_inspect_toggle[id] && !get_pdata_int(weapon, m_fInReload, XoWeapon))
        set_pev(id, pev_weaponanim, anim);

    return PLUGIN_HANDLED;
}

public Enable_Inspect(id)
{
    g_inspect_toggle[id] = 1;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
Image
CSGO Original Module[35%]
User avatar
Doctor whO? <3
Membru, skill +3
Membru, skill +3
Posts: 1199
Joined: 21 Jun 2013, 12:40
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Reputatie: Fost Membru Club eXtreamCS (doua luni)
Has thanked: 111 times
Been thanked: 76 times
Contact:

15 Jun 2020, 15:36

Mersi, sper sa nu mai apara errori.
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests