Half-Life и Adrenaline Gamer форум
http://www.aghl.ru/forum/

No Fall Death из CS в HL
http://www.aghl.ru/forum/viewtopic.php?f=28&t=1000
Страница 1 из 1

Автор:  rfc1 [ 06 ноя 2012, 13:10 ]
Заголовок сообщения:  No Fall Death из CS в HL

Описание:
При падении с большой высоты не отнимутся hp.

Модули:
Fakemeta & Hamsandwich

Просьба: скриптерам сделать чтобы плагин работал в HL, плиз.

 no_fall_death.sma

Автор:  Glaster [ 12 июн 2021, 21:10 ]
Заголовок сообщения:  Re: No Fall Death из CS в HL

Можно сделать проще:

Код:
#include <amxmodx>
#include <engine>
#define FALL_VELOCITY 350.0
public plugin_init() {
  register_plugin("No Fall Damage", "1.0", "Glaster");
  if(!cvar_exists("mp_falldamage")) {
    register_cvar("mp_falldamage", "0");                             
  }   
}

new bool:falling[33];
   
public client_PreThink(id) {         
  if(get_cvar_num("mp_falldamage") == 0
  && is_user_alive(id)
  && is_user_connected(id)) {
    if(entity_get_float(id, EV_FL_flFallVelocity) >= FALL_VELOCITY) {
      falling[id] = true;
    } else {
      falling[id] = false;
    }
  }
}

public client_PostThink(id) { 
  if(get_cvar_num("mp_falldamage") == 0
  && is_user_alive(id)
  && is_user_connected(id)) {
    if(falling[id]) {
      entity_set_int(id, EV_INT_watertype, -3);
    }
  }
}       

Страница 1 из 1 Часовой пояс: UTC + 5 часов [ Летнее время ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/