hlmod.hu
https://hlmod.hu/

Sebzés
https://hlmod.hu/viewtopic.php?f=9&t=24434
Oldal: 1 / 1

Szerző:  Patrik3 [ 2016.03.27. 10:23 ]
Hozzászólás témája:  Sebzés

Sziasztok!
Azt meg lehetne-e oldani ,hogy aki használja a fegyvert azt ne ölje meg?
Valaki tudna ebben segíteni?
Vagyis annyit kellene-e megcsinálni ,hogy ha a használó közel lövi a golyót akkor ne halljon meg ő is.

'HoTDoG'

  1. public Damage_spear(Ent)
  2. {
  3.     static Owner; Owner = pev(Ent, pev_owner)
  4.     static Attacker
  5.     if(!is_user_alive(Owner))
  6.     {
  7.         Attacker = 0
  8.         return
  9.     } else Attacker = Owner
  10.        
  11.     for(new i = 0; i < g_MaxPlayers; i++)
  12.     {
  13.         if(!is_user_alive(i))
  14.             continue
  15.         if(entity_range(i, Ent) > 100.0)
  16.             continue
  17.            
  18.         if(!g_rightclick) ExecuteHamB(Ham_TakeDamage, i, 0, Attacker, get_pcvar_float(cvar_dmg1_spear), DMG_BULLET)
  19.         else ExecuteHamB(Ham_TakeDamage, i, 0, Attacker, get_pcvar_float(cvar_dmg2_spear), DMG_BULLET)
  20.        
  21.         static Float:v_Velocity[3], Float:ori_Velocity[3]
  22.         pev(i, pev_velocity, ori_Velocity)
  23.         v_Velocity[0] = ori_Velocity[0]
  24.         v_Velocity[1] = ori_Velocity[1]
  25.         v_Velocity[2] = 230.0
  26.         entity_set_vector(i, EV_VEC_velocity, v_Velocity)
  27.         g_rightclick = 0
  28.     }
  29.    
  30.     for(new i = 0; i < g_MaxPlayers; i++)
  31.     {
  32.         if(!is_user_alive(i))
  33.             continue
  34.         if(entity_range(i, Ent) > 200.0)
  35.             continue
  36.         if(!g_had_speargun[i])
  37.             continue
  38.         if(i != Owner)
  39.             continue
  40.            
  41.         static Float:v_Velocity[3], Float:ori_Velocity[3]
  42.         pev(i, pev_velocity, ori_Velocity)
  43.         v_Velocity[0] = ori_Velocity[0]
  44.         v_Velocity[1] = ori_Velocity[1]
  45.         v_Velocity[2] = 250.0
  46.         entity_set_vector(i, EV_VEC_velocity, v_Velocity)
  47.     }
  48. }

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/