Добро пожаловать

Для полноценного пользования форумом и общения с его участниками, пройдите регистрацию ниже
Регистрация

Помогите исправить у плагина ошибку! сервер ато падает

Тема в разделе "Свалка", создана пользователем oTBePTKa1337, 12 дек 2014.

  1. oTBePTKa1337

    oTBePTKa1337 Пользователь

    3
    0
    25
    #include
    #include
    #include
    #include
    #include
    #include
    #include

    new const ball_name[] = "paralize_ball"
    new const ball_model[] = "models/w_hiddentail2.mdl"
    new const ball_soundtouch[] = { "warcraft3/frostnova.wav" }

    new const zclass_name[] = { "Ревенант ICE" } // name
    new const zclass_info[] = { "\r[ VIP ]" } // description
    new const zclass_model[] = { "revenant_ice" } // model
    new const zclass_clawmodel[] = { "v_revenant_ice.mdl" } // claw model
    const zclass_health = 12000 // health
    const zclass_speed = 245 // speed
    const Float:zclass_gravity = 0.7 // gravity
    const Float:zclass_knockback = 1.0 // knockback
    new const v_zombie_bomb_model[64] = "revenant_ice"

    new g_CurWeapon[33], g_bombmodelwpn[64]

    #define OFFSET_MODELINDEX 491
    #define OFFSET_LINUX 5

    new index, defaultindex

    new g_zclassparalize
    new cvar_paralizedelay , cvar_paralizevelocity , cvar_paralizeballhealth , cvar_paralizeballparalizetime
    new sTrail , g_touchs[512] , g_can[33] , g_paralizen[33]

    new const WeaponNames[][] =
    {
    "", "weapon_p228", "", "weapon_scout", "weapon_hegrenade", "weapon_xm1014", "weapon_c4", "weapon_mac10",
    "weapon_aug", "weapon_smokegrenade", "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_flashbang", "weapon_deagle", "weapon_sg552",
    "weapon_ak47", "weapon_knife", "weapon_p90"
    }

    public plugin_init()
    {
    register_plugin("[ZP] Zombie Class: Revenant Ice", "1.0", "=), LARS-BLOODLIKER")

    cvar_paralizedelay = register_cvar("zp_classparalize_delay","15")
    cvar_paralizevelocity = register_cvar("zp_classparalizeball_velocity","1300")
    cvar_paralizeballhealth = register_cvar("zp_classparalizeball_health","5")
    cvar_paralizeballparalizetime = register_cvar ( "zp_classparalizeball_paralizetime", "7.0" )

    register_touch(ball_name, "worldspawn", "touchWorld")
    register_touch(ball_name, "func_wall", "touchWorld")
    register_touch(ball_name, "func_door", "touchWorld")
    register_touch(ball_name, "func_door_rotating", "touchWorld")
    register_touch(ball_name, "func_wall_toggle", "touchWorld")
    register_touch(ball_name, "func_breakable", "touchWorld")
    register_touch(ball_name, "player", "touchPlayer")
    register_think(ball_name,"ball_think")

    register_clcmd("drop","paralize_cmd")
    register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
    register_forward(FM_PlayerPreThink, "fw_PreThink")

    RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")

    register_event("CurWeapon", "Event_CurrentWeapon", "be", "1=1")

    for(new i = 1; i < sizeof WeaponNames; i++)
    if(WeaponNames[0]) RegisterHam(Ham_Item_Deploy, WeaponNames, "fw_Weapon_Deploy_Post", 1)

    RegisterHam(Ham_Player_Duck, "player", "Player_Duck", 1)
    }

    public plugin_precache()
    {
    precache_model(ball_model)
    sTrail = precache_model("sprites/laserbeam.spr")

    g_zclassparalize = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)

    formatex(g_bombmodelwpn, charsmax(g_bombmodelwpn), "models/zombie_plague/v_bomb_%s.mdl", v_zombie_bomb_model)
    engfunc(EngFunc_PrecacheModel, g_bombmodelwpn)

    index = precache_model("models/player/revenant_ice/revenant_ice.mdl")
    defaultindex = precache_model("models/player.mdl")
    }

    public paralize_cmd( id )
    {
    if( !is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_zombie_class(id) != g_zclassparalize || zp_get_user_nemesis(id) )
    return PLUGIN_CONTINUE;

    if(g_can[id])
    {
    client_print(id,print_center,"Востановление через %d секунд",g_can[id])
    return PLUGIN_HANDLED;
    }

    static Float:eek:rigin[3], Float:angles[3], Float:v_forward[3], Float:v_right[3], Float:v_up[3], Float:gun_position[3], Float:player_origin[3], Float:player_view_offset[3];
    static Float:OriginX[3]
    pev(id, pev_v_angle, angles);
    pev(id, pev_origin, OriginX);
    engfunc(EngFunc_MakeVectors, angles);

    global_get(glb_v_forward, v_forward);
    global_get(glb_v_right, v_right);
    global_get(glb_v_up, v_up);

    //m_pPlayer->GetGunPosition( ) = pev->origin + pev->view_ofs
    pev(id, pev_origin, player_origin);
    pev(id, pev_view_ofs, player_view_offset);
    xs_vec_add(player_origin, player_view_offset, gun_position);

    xs_vec_mul_scalar(v_forward, 13.0, v_forward);
    xs_vec_mul_scalar(v_right, 0.0, v_right);
    xs_vec_mul_scalar(v_up, 5.0, v_up);

    xs_vec_add(gun_position, v_forward, origin);
    xs_vec_add(origin, v_right, origin);
    xs_vec_add(origin, v_up, origin);

    new Float:StartOrigin[3]

    StartOrigin[0] = origin[0];
    StartOrigin[1] = origin[1];
    StartOrigin[2] = origin[2];


    new Float:fVelocity[3] , Float:flOrigin[3] , Float:flAngle[3]
    pev(id,pev_origin,flOrigin)
    pev(id,pev_angles,flAngle)

    new ball = create_entity("info_target")

    if (!ball) return PLUGIN_HANDLED

    g_touchs[ball] = 0

    entity_set_string(ball, EV_SZ_classname, ball_name)

    entity_set_model(ball, ball_model)

    entity_set_origin(ball, StartOrigin)

    entity_set_vector(ball, EV_VEC_angles, flAngle)

    new Float:MinBox[3] = {-1.0, -1.0, -1.0}
    new Float:MaxBox[3] = {1.0, 1.0, 1.0}
    entity_set_vector(ball, EV_VEC_mins, MinBox)
    entity_set_vector(ball, EV_VEC_maxs, MaxBox)

    entity_set_int(ball, EV_INT_solid, SOLID_SLIDEBOX)

    entity_set_int(ball, EV_INT_movetype, MOVETYPE_BOUNCEMISSILE)

    entity_set_edict(ball, EV_ENT_owner, id)

    entity_set_int(ball, EV_INT_effects, EF_BRIGHTLIGHT)

    VelocityByAim(id, get_pcvar_num(cvar_paralizevelocity ), fVelocity)
    entity_set_vector(ball , EV_VEC_velocity, fVelocity)

    fm_set_rendering(ball, kRenderFxGlowShell,255, 255, 255, kRenderNormal, 16)

    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte(TE_BEAMFOLLOW) // Temporary entity ID
    write_short(ball) // Entity
    write_short(sTrail) // Sprite index
    write_byte(10) // Life
    write_byte(3) // Line width
    write_byte(100) // Red
    write_byte(255) // Green
    write_byte(255) // Blue
    write_byte(255) // Alpha
    message_end()

    UTIL_PlayPlayerAnimation(id,10)
    UTIL_PlayWeaponAnimation(id,8)

    g_can[id] = get_pcvar_num(cvar_paralizedelay)
    set_task(1.0,"ability_zero",id)

    entity_set_float(ball, EV_FL_health , get_pcvar_float(cvar_paralizeballhealth))

    entity_set_float(ball, EV_FL_nextthink, get_gametime() + 0.1)

    return PLUGIN_HANDLED;
    }

    public touchWorld(ball, world) {

    emit_sound(ball, CHAN_WEAPON, ball_soundtouch, 1.0, ATTN_NORM, 0, PITCH_NORM)
    g_touchs[ball] += 1
    if(g_touchs[ball] == get_pcvar_num(cvar_paralizeballhealth)) remove_entity(ball)

    return PLUGIN_HANDLED
    }

    public touchPlayer(ball, player) {
    client_print(0,print_chat,"Вы попали в %d",player)
    remove_task(player)
    paralize(player)
    //set_task(get_pcvar_float(cvar_paralizeballparalizetime),"unparalize_player",player)

    return PLUGIN_HANDLED
    }

    public event_round_start()
    {
    new iEnt = FM_NULLENT;
    while( (iEnt = engfunc(EngFunc_FindEntityByString, iEnt, "classname", ball_name)) > 0 )
    {
    engfunc(EngFunc_RemoveEntity,iEnt)
    }

    for(new i;i
     
  2. 4e6yPaIIIka

    4e6yPaIIIka Забанен

    52
    6
    80
    Удали этот плагин. Он багнутый