Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

removal of the model in the destruction of


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
5 odpowiedzi w tym temacie

#1 AladinBOX

    Nowy

  • Nowy

Reputacja: 0
Nowy

  • Postów:4
  • Lokalizacja:Ru
Offline

Napisano 20.04.2016 09:50

#include <amxmodx>
#include <engine>
#include <fakemeta_util>
#include <hamsandwich>

new g_player_main[33], g_remoting[33], g_player_main2[33], g_firing[33], g_preparing[33], g_ending[33], g_had_minigun[33], g_reloading[500], g_heat[500], g_dead[500], g_owner[500]
new Float:g_last_firesound[33], Float:g_last_shoot[33], Float:g_check_heat[33]
new const base_model[] = "models/mw2_auto/base.mdl"
new const main_model[] = "models/mw2_auto/main.mdl"

new const minigun_sound[3][] = {
   "mw2_auto/minigun-starting.wav",
   "mw2_auto/minigun-shooting.wav",
   "mw2_auto/minigun-stoping.wav"
}

new g_minigun, g_reg, g_sync_hud1, g_blood, g_bloodspray
new cvar_minigun_health, cvar_minigun_dmgrand_start, cvar_minigun_dmgrand_end, cvar_delay_attack, cvar_reload_time

// Weapon entity names
new const WEAPONENTNAMES[][] = { "", "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("[MW2] Auto Minigun", "1.0", "Dias")
   
   register_clcmd("say /m", "giveItemGun")
   
   register_event("HLTV", "event_newround", "a", "1=0", "2=0")
   register_event("DeathMsg", "event_death", "a")
   
   register_think("mw2_mingun_main", "fw_main_think")
   register_forward(FM_CmdStart, "fw_CmdStart")
   for (new i = 1; i < sizeof WEAPONENTNAMES; i++) if (WEAPONENTNAMES[i][0]) RegisterHam(Ham_Item_Deploy, WEAPONENTNAMES[i], "fw_Item_Deploy_Post", 1)   
   
   g_sync_hud1 = CreateHudSyncObj(645)
   
   // Cvars
   cvar_minigun_health = register_cvar("zp_minigun_health", "500")
   cvar_minigun_dmgrand_start = register_cvar("zp_minigun_dmgrand_start", "10")
   cvar_minigun_dmgrand_end = register_cvar("zp_minigun_dmgrand_end", "30")
   cvar_delay_attack = register_cvar("zp_minigun_delay_attack", "0.1")
   cvar_reload_time = register_cvar("zp_minigun_reload_time", "30.0")
   
   //register_clcmd("say /make", "create_minigun")
   //register_clcmd("say /remote", "remote_minigun")
}

public plugin_precache() {
   precache_model(base_model)
   precache_model(main_model)
   
   for(new i = 0; i < sizeof(minigun_sound); i++) engfunc(EngFunc_PrecacheSound, minigun_sound[i])
   
   g_blood = precache_model("sprites/blood.spr")
   g_bloodspray = precache_model("sprites/bloodspray.spr")
}

public event_newround() {
   remove_entity_name("mw2_mingun_base")
   remove_entity_name("mw2_mingun_main")
   remove_entity_name("mw2_mingun_view")
   
   for(new i = 0; i < get_maxplayers(); i++) if(is_user_alive(i) && is_user_connected(i)) reset_minigun(i)
}

public event_death() {
   static victim
   victim = read_data(2)
   
   reset_minigun(victim)
}

public reset_minigun(id) {
   attach_view(id, id)
   
   g_had_minigun[id] = 0
   g_player_main[id] = 0
   g_player_main2[id] = 0
   g_remoting[id] = 0
   g_preparing[id] = 0
   g_firing[id] = 0
   g_ending[id] = 0
   
   remove_task(id+2479)

   message_begin(MSG_ONE_UNRELIABLE, 108, {0,0,0}, id)
   write_short(0)
   message_end()   
}
// Берем миниган
public giveItemGun(id, itemid) {
   if(itemid == g_minigun) {
      g_had_minigun[id] = 1
      create_minigun(id)
   }
}

public create_minigun(id) {
   if(!g_had_minigun[id]) return
   
   g_had_minigun[id] = 0
   
   new Float:Origin[3], Float:Angles[3]
   
   get_position(id, 40.0, 0.0, 0.0, Origin)
   pev(id, pev_angles, Angles)
   
   // Make the Base
   new ent = create_entity("info_target")
   entity_set_origin(ent, Origin);
   
   Angles[0] = 0.0
   entity_set_vector(ent, EV_VEC_angles, Angles)

   entity_set_string(ent,EV_SZ_classname, "mw2_mingun_base")
   entity_set_model(ent, base_model);
   entity_set_int(ent,EV_INT_solid, SOLID_NOT)
   
   entity_set_float(ent,EV_FL_takedamage,1.0)
   entity_set_float(ent,EV_FL_health, get_pcvar_float(cvar_minigun_health) + 1000.0)

   new Float:maxs[3] = {10.0,10.0,1.0}
   new Float:mins[3] = {-10.0,-10.0,-1.0}
   entity_set_size(ent,mins,maxs)
   
   set_entity_anim(ent, 0)
   g_dead[ent] = 0
   g_owner[ent] = id
   
   entity_set_float(ent,EV_FL_nextthink, halflife_time() + 0.01)
   
   drop_to_floor(ent)
   
   // Create Main
   ent = create_entity("info_target")
   
   Origin[2] -= 35.0
   entity_set_origin(ent, Origin);
   entity_set_vector(ent, EV_VEC_angles, Angles)
   
   entity_set_string(ent,EV_SZ_classname, "mw2_mingun_main")
   entity_set_model(ent, main_model);
   entity_set_int(ent,EV_INT_solid, SOLID_BBOX)
   
   entity_set_float(ent,EV_FL_takedamage,1.0)
   entity_set_float(ent,EV_FL_health, get_pcvar_float(cvar_minigun_health) + 1000.0)   

   new Float:maxs2[3] = {10.0,10.0,20.0}
   new Float:mins2[3] = {-10.0,-10.0,-20.0}
   entity_set_size(ent,mins2,maxs2)   
   
   set_entity_anim(ent, 0)
   g_heat[ent] = 0
   
   entity_set_float(ent,EV_FL_nextthink, halflife_time() + 0.01)   
   g_player_main[id] = ent
   g_dead[ent] = 0
   g_owner[ent] = id
   g_reloading[ent] = 0
   
   drop_to_floor(ent)
   if(!g_reg) {
      g_reg = 1
      RegisterHamFromEntity(Ham_TakeDamage, ent, "fw_main_takedamage")
   }
   
   // Create View Ent
   ent = create_entity("info_target")
   
   get_position(id, 40.0, 0.0, 10.0, Origin)
   
   entity_set_origin(ent, Origin);
   entity_set_vector(ent, EV_VEC_angles, Angles)
   
   entity_set_string(ent,EV_SZ_classname, "mw2_mingun_view")
   entity_set_model(ent, main_model);
   
   fm_set_rendering(ent, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
   
   g_player_main2[id] = ent
}

public do_remote(id) {
   id -= 2479
   remote_minigun(id)
}

public remote_minigun(id) {
   if(!g_player_main[id]) return
   
   attach_view(id, g_player_main2[id])
   engclient_cmd(id, "weapon_knife")
   
   set_task(1.0, "task_delay", id)
   
   client_printcolor(id, "!g[ZP]!y Press !t(E)!y to turn of the MW2-Auto Minigun !!!")
}

public task_delay(id) g_remoting[id] = 1

public client_PostThink(id) {
   if(!g_remoting[id]) return
   if(!g_player_main[id]) return   
   if(!pev_valid(g_player_main[id])) {
      reset_minigun(id)
      return
   }
   
   if(!g_firing[id] && !g_reloading[g_player_main[id]]) {
      if(g_heat[g_player_main[id]] > 0) {
         static Float:CurTime
         CurTime = get_gametime()
         
         if(CurTime - get_pcvar_float(cvar_delay_attack) * 2 > g_check_heat[id]) {
            g_heat[g_player_main[id]]--
            g_check_heat[id] = CurTime
         }
      }
   }
   
   static Message[64]
   
   if(g_heat[g_player_main[id]] <= 0) {
      set_hudmessage(0, 255, 0, -1.0, 0.90, 0, 1.0, 1.0)
      formatex(Message, sizeof(Message), "Status: Good")
   } else if(g_heat[g_player_main[id]] > 0 && g_heat[g_player_main[id]] < 100) {
      set_hudmessage(255, 255, 0, -1.0, 0.90, 0, 1.0, 1.0)
      formatex(Message, sizeof(Message), "Status: Heat %i%%", g_heat[g_player_main[id]])
   } else if(g_heat[g_player_main[id]] >= 100) {
      set_hudmessage(255, 0, 0, -1.0, 0.90, 0, 1.0, 1.0)
      formatex(Message, sizeof(Message), "Status: OverHeat")
   }
   
   ShowSyncHudMsg(id, g_sync_hud1, Message)
   
   static Float:NewAngles[3]
   pev(id, pev_angles, NewAngles)
   
   set_pev(g_player_main[id], pev_v_angle, NewAngles)
   set_pev(g_player_main[id], pev_angles, NewAngles)
   
   NewAngles[0] -= NewAngles[0] * 3
   set_pev(g_player_main2[id], pev_angles, NewAngles)
   
   if(get_user_weapon(id) != CSW_KNIFE) engclient_cmd(id, "weapon_knife")
}

public fw_main_think(ent) {
   if(!pev_valid(ent)) return
   if(pev(ent, pev_health) - 1000.0 < 0) {
      if(!g_dead[ent])
         minigun_dead(ent)
      return
   }
   
   if(!g_dead[ent]) entity_set_float(ent,EV_FL_nextthink, halflife_time() + 0.01)   
}

public fw_main_takedamage(victim, inflictor, attacker, Float:Damage, damagebits) {
   if(!is_user_alive(attacker) || !is_user_connected(attacker)) return HAM_IGNORED
   
   static Health
   Health = pev(victim, pev_health) - 1000
   
   client_print(attacker, print_center, "MW2 Auto-Minigun Health: %i", Health)
   
   return HAM_HANDLED
}

public minigun_dead(ent) {
   g_dead[ent] = 1
   
   static Float:Origin[3]
   pev(ent, pev_origin, Origin)
   
   static id
   id = g_owner[ent]
   
   if(is_user_connected(id)) {
      reset_minigun(id)
      client_printcolor(id, "!g[ZP]!y Your MW2 Auto-Minigun has been !tDestroyed!y !!!")
   }
   
   Origin[0] = 9999.0
   Origin[1] = 9999.0
   Origin[2] = 9999.0
   
   set_pev(ent, pev_origin, Origin)
}

public fw_CmdStart(id, uc_handle, seed) {
   if(!is_user_alive(id) || !is_user_connected(id)) return FMRES_IGNORED
   if(!g_player_main[id]) return FMRES_IGNORED
      
   static PressButton
   PressButton = get_uc(uc_handle, UC_Buttons)
   
   if(g_remoting[id]) {
      if(PressButton & IN_ATTACK) {
         static Float:CurTime
         CurTime = get_gametime()
         
         if(CurTime - get_pcvar_float(cvar_delay_attack) > g_last_shoot[id]) {
            if(!g_preparing[id] && !g_firing[id] && !g_ending[id]) {
               g_preparing[id] = 1
               g_firing[id] = 0
               
               set_entity_anim(g_player_main[id], 1)
               set_task(0.3, "start_attack", id)
               
               emit_sound(g_player_main[id], CHAN_WEAPON, minigun_sound[0], 1.0, ATTN_NORM, 0, PITCH_NORM)
            }
            
            if(!g_preparing[id] && g_firing[id] && !g_ending[id] && g_heat[g_player_main[id]] < 100) {
               minigun_shoot(id)
               
               if(CurTime - get_pcvar_float(cvar_delay_attack) > g_check_heat[id]) {
                  if(g_heat[g_player_main[id]] < 100)
                     g_heat[g_player_main[id]]++
                  
                  g_check_heat[id] = CurTime
               }
            } else if(g_heat[g_player_main[id]] >= 100) {
               if(!g_preparing[id] && g_firing[id] && !g_ending[id] && !g_reloading[g_player_main[id]]) {
                  g_firing[id] = 0
                  g_preparing[id] = 0
                  g_ending[id] = 1
                  
                  set_entity_anim(g_player_main[id], 3)
               
                  emit_sound(g_player_main[id], CHAN_WEAPON, minigun_sound[2], 1.0, ATTN_NORM, 0, PITCH_NORM)
                  set_task(2.0, "stop_attack", id)
                  
                  static Message[128]
                  formatex(Message, sizeof(Message), "!g[ZP]!y System is overheat. Please wait !t%i!y seconds !!!", get_pcvar_float(cvar_reload_time))
                  
                  client_printcolor(id, Message)
                  
                  g_reloading[g_player_main[id]] = 1
                  set_task(get_pcvar_float(cvar_reload_time), "reload_heat", id)
               }
            }
            
            g_last_shoot[id] = CurTime
         }
         
         PressButton &= ~IN_ATTACK
         set_uc(uc_handle, UC_Buttons, PressButton)
      } else {
         if(pev(id, pev_oldbuttons) & IN_ATTACK) {
            if(g_preparing[id] || g_firing[id]) {
               g_firing[id] = 0
               g_preparing[id] = 0
               g_ending[id] = 1
               
               set_entity_anim(g_player_main[id], 3)
               
               emit_sound(g_player_main[id], CHAN_WEAPON, minigun_sound[2], 1.0, ATTN_NORM, 0, PITCH_NORM)
               set_task(2.0, "stop_attack", id)
            }
         }
      }
   }
   
   if(PressButton & IN_USE) {
      if(g_remoting[id]) {
         set_task(1.0, "task_delay2", id)
         attach_view(id, id)
         g_preparing[id] = 0
         g_firing[id] = 0
         
         PressButton &= ~IN_USE
         set_uc(uc_handle, UC_Buttons, PressButton)
      } else {
         if(!task_exists(id+2479)) {
            set_task(3.0, "do_remote", id+2479)
            
            message_begin(MSG_ONE_UNRELIABLE, 108, {0,0,0}, id)
            write_short(3)
            message_end()
         }
      }
   } else {
      if(pev(id, pev_oldbuttons) & IN_USE) {
         remove_task(id+2479)

         message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("BarTime"), {0,0,0}, id)
         write_short(0)
         message_end()
      }
   }
   
   return FMRES_HANDLED
}

public reload_heat(id) {
   if(!pev_valid(g_player_main[id])) return
   
   g_heat[g_player_main[id]] = 0
   g_reloading[g_player_main[id]] = 0
}

public task_delay2(id) g_remoting[id] = 0

public start_attack(id) {
   g_preparing[id] = 0
   g_firing[id] = 1
}

public stop_attack(id) {
   g_preparing[id] = 0
   g_firing[id] = 0
   g_ending[id] = 0
}

public minigun_shoot(id) {
   if(!g_remoting[id]) return PLUGIN_HANDLED
   
   static Float:CurTime
   CurTime = get_gametime()
   
   if(CurTime - 0.1 > g_last_firesound[id]) {
      PlaySound(id, minigun_sound[1])
      emit_sound(g_player_main[id], CHAN_BODY, minigun_sound[1], 1.0, ATTN_NORM, 0, PITCH_NORM)
      g_last_firesound[id] = CurTime
   }

   set_entity_anim(g_player_main[id], 2)
   
   static Float:Origin[3], Float:AimOrigin[3]
   get_position(g_player_main[id], 50.0, 0.0, 0.0, Origin)
   
   get_position(g_player_main[id], 50.0, 0.0, 50.0, Origin)
   get_position(g_player_main[id], 4000.0, 0.0, 30.0, AimOrigin)
   create_tracer(id, Origin, AimOrigin)
   
   return PLUGIN_HANDLED
}

// Ham Weapon Deploy Forward
public fw_Item_Deploy_Post(weapon_ent) {
   if(pev_valid(weapon_ent)) return HAM_IGNORED
   
   static id
   id = pev(weapon_ent, pev_owner)
   
   if(g_remoting[id]) engclient_cmd(id, "weapon_knife")
   
   return HAM_HANDLED
}

stock get_position(id,Float:forw, Float:right, Float:up, Float:vStart[]) {
   new Float:vOrigin[3], Float:vAngle[3], Float:vForward[3], Float:vRight[3], Float:vUp[3]
   
   pev(id, pev_origin, vOrigin)
   pev(id, pev_view_ofs,vUp) //for player
   xs_vec_add(vOrigin,vUp,vOrigin)
   pev(id, pev_v_angle, vAngle) // if normal entity ,use pev_angles
   vAngle[0] -= vAngle[0] * 3
   
   angle_vector(vAngle,ANGLEVECTOR_FORWARD,vForward) //or use EngFunc_AngleVectors
   angle_vector(vAngle,ANGLEVECTOR_RIGHT,vRight)
   angle_vector(vAngle,ANGLEVECTOR_UP,vUp)
   
   vStart[0] = vOrigin[0] + vForward[0] * forw + vRight[0] * right + vUp[0] * up
   vStart[1] = vOrigin[1] + vForward[1] * forw + vRight[1] * right + vUp[1] * up
   vStart[2] = vOrigin[2] + vForward[2] * forw + vRight[2] * right + vUp[2] * up
}

stock create_tracer(id, Float:start[3], Float:end[3]) {
   new start_[3], end_[3]
   FVecIVec(start, start_)
   FVecIVec(end, end_)
   message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
   write_byte(TE_TRACER)
   write_coord(start_[0])
   write_coord(start_[1])
   write_coord(start_[2])
   write_coord(end_[0])
   write_coord(end_[1])
   write_coord(end_[2])
   message_end()
   
   static tr, Float:End_Origin[3], Target
   engfunc(EngFunc_TraceLine, start, end, DONT_IGNORE_MONSTERS, -1, tr)   
   
   get_tr2(tr, TR_vecEndPos, End_Origin)
   Target = get_tr2(tr, TR_pHit)
   
   if(is_user_alive(Target)) {
      static Float:Origin[3]
      pev(Target, pev_origin, Origin)
      
      // Show some blood :)
      message_begin(MSG_BROADCAST, SVC_TEMPENTITY) 
      write_byte(TE_BLOODSPRITE)
      write_coord(floatround(Origin[0])) 
      write_coord(floatround(Origin[1])) 
      write_coord(floatround(Origin[2])) 
      write_short(g_bloodspray)
      write_short(g_blood)
      write_byte(70)
      write_byte(random_num(1,2))
      message_end()
      
      ExecuteHamB(Ham_TakeDamage, Target, 0, id, random_float(get_pcvar_float(cvar_minigun_dmgrand_start), get_pcvar_float(cvar_minigun_dmgrand_end)), DMG_BULLET)
   }
   
   make_bullet(id, End_Origin)
}

PlaySound(id, const sound[]) client_cmd(id, "spk ^"%s^"", sound)

stock make_bullet(id, Float:Origin[3]) {
   // Find target
   new target, body
   get_user_aiming(id, target, body, 999999)
   
   if(target > 0 && target <= get_maxplayers()) {
      new Float:fStart[3], Float:fEnd[3], Float:fRes[3], Float:fVel[3]
      pev(id, pev_origin, fStart)
      
      // Get ids view direction
      velocity_by_aim(id, 64, fVel)
      
      // Calculate position where blood should be displayed
      fStart[0] = Origin[0]
      fStart[1] = Origin[1]
      fStart[2] = Origin[2]
      fEnd[0] = fStart[0]+fVel[0]
      fEnd[1] = fStart[1]+fVel[1]
      fEnd[2] = fStart[2]+fVel[2]
      
      // Draw traceline from victims origin into ids view direction to find
      // the location on the wall to put some blood on there
      new res
      engfunc(EngFunc_TraceLine, fStart, fEnd, 0, target, res)
      get_tr2(res, TR_vecEndPos, fRes)
      
      // Show some blood :)
      message_begin(MSG_BROADCAST, SVC_TEMPENTITY) 
      write_byte(TE_BLOODSPRITE)
      write_coord(floatround(fStart[0])) 
      write_coord(floatround(fStart[1])) 
      write_coord(floatround(fStart[2])) 
      write_short(g_bloodspray)
      write_short(g_blood)
      write_byte(70)
      write_byte(random_num(1,2))
      message_end()
      
   } else {
      new decal = 41
      
      // Check if the wall hit is an entity
      if(target) {
         // Put decal on an entity
         message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
         write_byte(TE_DECAL)
         write_coord(floatround(Origin[0]))
         write_coord(floatround(Origin[1]))
         write_coord(floatround(Origin[2]))
         write_byte(decal)
         write_short(target)
         message_end()
      } else {
         // Put decal on "world" (a wall)
         message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
         write_byte(TE_WORLDDECAL)
         write_coord(floatround(Origin[0]))
         write_coord(floatround(Origin[1]))
         write_coord(floatround(Origin[2]))
         write_byte(decal)
         message_end()
      }
      
      // Show sparcles
      message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
      write_byte(TE_GUNSHOTDECAL)
      write_coord(floatround(Origin[0]))
      write_coord(floatround(Origin[1]))
      write_coord(floatround(Origin[2]))
      write_short(id)
      write_byte(decal)
      message_end()
   }
}

stock set_entity_anim(ent, anim) {
   entity_set_float(ent, EV_FL_animtime, get_gametime())
   entity_set_float(ent, EV_FL_framerate, 1.0)
   entity_set_int(ent, EV_INT_sequence, anim)
}

stock client_printcolor(const id, const input[], any:...) {
   new iCount = 1, iPlayers[32]
   static szMsg[191]
   
   vformat(szMsg, charsmax(szMsg), input, 3)
   replace_all(szMsg, 190, "!g", "^4")
   replace_all(szMsg, 190, "!y", "^1")
   replace_all(szMsg, 190, "!t", "^3")
   
   if(id) iPlayers[0] = id
   else get_players(iPlayers, iCount, "ch")
   
   for (new i = 0; i < iCount; i++) {
      if(is_user_connected(iPlayers[i])) {
         message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, iPlayers[i])
         write_byte(iPlayers[i])
         write_string(szMsg)
         message_end()
      }
   }
}

how to remove the model when destruction


  • +
  • -
  • 0

#2 Vasto_Lorde

    Wszechmogący

  • Power User

Reputacja: 256
Wszechwidzący

  • Postów:633
  • GG:
  • Steam:steam
  • Imię:Maćko
  • Lokalizacja:Poznań
Offline

Napisano 20.04.2016 12:38

When this is displayed:

client_printcolor(id, "!g[ZP]!y Your MW2 Auto-Minigun has been !tDestroyed!y !!!")

You can just simply change weapon of id, so the model resets itself. It can be done like this:

client_cmd(id, "; lastinv");

  • +
  • -
  • 0

#3 AladinBOX

    Nowy

  • Autor tematu
  • Nowy

Reputacja: 0
Nowy

  • Postów:4
  • Lokalizacja:Ru
Offline

Napisano 20.04.2016 12:55

nothing happened. Foot model should disappear as guns and model.


  • +
  • -
  • 0

#4 Vasto_Lorde

    Wszechmogący

  • Power User

Reputacja: 256
Wszechwidzący

  • Postów:633
  • GG:
  • Steam:steam
  • Imię:Maćko
  • Lokalizacja:Poznań
Offline

Napisano 20.04.2016 20:48

I didnt understand you at first. You are talking about this model, right?

base_model[] = "models/mw2_auto/base.mdl"

I think i have a solution to your problem. So the main.mdl is just laying on the base.mdl. We can detect it by this function:

entity_get_edict(ent, EV_ENT_groundentity)

I have never used it so it might be wrong.

 

 

 

 

Find this:

public minigun_dead(ent) {

and change the last line of this function from this:

set_pev(ent, pev_origin, Origin)

to THIS:

set_pev(entity_get_edict(ent, EV_ENT_groundentity), pev_origin, Origin)
set_pev(ent, pev_origin, Origin)

  • +
  • -
  • 0

#5 AladinBOX

    Nowy

  • Autor tematu
  • Nowy

Reputacja: 0
Nowy

  • Postów:4
  • Lokalizacja:Ru
Offline

Napisano 21.04.2016 17:11

Sorry for my english

does not work, the model is not removed :(


  • +
  • -
  • 0

#6 AladinBOX

    Nowy

  • Autor tematu
  • Nowy

Reputacja: 0
Nowy

  • Postów:4
  • Lokalizacja:Ru
Offline

Napisano 27.04.2016 01:04

Help


  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych