Half-Life и Adrenaline Gamer форум

Всё об игре в Халф-Лайф и АГ
Текущее время: 19 мар 2024, 10:24

Часовой пояс: UTC + 5 часов [ Летнее время ]




Начать новую тему Ответить на тему  [ Сообщений: 9 ] 
Автор Сообщение
 Заголовок сообщения: check entity kill players (worldspawn)
СообщениеДобавлено: 25 янв 2018, 02:51 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
19 мар 2024, 03:43
Сообщения: 1018
Hello!
there many entity in maps when killed the players will write that player (killed self with worldspawn) like water for example.
the question is how to make it a private classname .. like othere (ex: trigger_hurt)

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: cheak entity kill players (worldspawn)
СообщениеДобавлено: 25 янв 2018, 16:42 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
18 мар 2024, 17:42
Сообщения: 6864
Hook DeathMsg and replace weapon name with whatever you want.


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: cheak entity kill players (worldspawn)
СообщениеДобавлено: 25 янв 2018, 16:56 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
19 мар 2024, 03:43
Сообщения: 1018
What if it was not what I was looking for (ex : fall dmg or othere.. there many entity has this weapon "worldspawn" Not knowing)
i try to hook it using pfn function :
Код:
public pfn_keyvalue( iEntity ) {
   new szClassName[ 22 ], szKeyName[ 17 ], szValue[ 17 ];
   copy_keyvalue( szClassName, 21, szKeyName, 16, szValue, 16 );

   if( equal( szClassName, "func_water" )/* && equal(szKeyName,"targetname") &&  equal(szValue,"bigwater")*/) {
      new iNew = create_entity( "trigger_hurt" );// myb it should trigger_push ?
      
      //DispatchKeyValue( iNew, "dmg", "10" );
      //DispatchKeyValue( iNew, "damagetype", "524288" ); //524288 = DROWNRECOVER<BR>  | 16384 = DROWN<BR>
      DispatchKeyValue( iNew, szKeyName, szValue );
      DispatchSpawn( iNew );
      server_print("===================== %s : %s ===================", szKeyName, szValue)
      entity_set_string( iNew, EV_SZ_classname, szClassName );
   }
}
}

This is exactly the idea I got the weapon is water when i enable dmg entity (iNew) else no results..
how i can make everything default and change this name of weapon "worldspawn"

here setting in the map undertow :
 

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: cheak entity kill players (worldspawn)
СообщениеДобавлено: 25 янв 2018, 18:13 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
18 мар 2024, 17:42
Сообщения: 6864
I dunno what you are doing and what you want to achieve.


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: check entity kill players (worldspawn)
СообщениеДобавлено: 25 янв 2018, 18:34 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
19 мар 2024, 03:43
Сообщения: 1018
The general idea is that :
I want to determine that the player died drowning in the water
but in the game said "Player killed self with worldspawn"
I want to replace the name of the weapon here to water "Player killed self with water"
is that possible ?

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: check entity kill players (worldspawn)
СообщениеДобавлено: 25 янв 2018, 19:04 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
18 мар 2024, 17:42
Сообщения: 6864
Sure, but you didn't specified where you want to replace that text. In client console?


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: check entity kill players (worldspawn)
СообщениеДобавлено: 25 янв 2018, 20:29 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
19 мар 2024, 03:43
Сообщения: 1018
Yeah, i want make water entity ID .. for use in other areas when needed.

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: check entity kill players (worldspawn)
СообщениеДобавлено: 25 янв 2018, 21:18 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
18 мар 2024, 17:42
Сообщения: 6864
abdobiskra писал(а):
i want make water entity ID
Woot? As usual, I don't understand you. :D

abdobiskra писал(а):
I want to replace the name of the weapon
Hook player TakeDamage, check pevAttacker (second argument), if not player, store pevInflictor (first argument) globally, if player, clear global variable.
Hook player Killed, if pevInflictor is filled, then it is not player killed player and classname of killer entity (pevInflictor) will be used to form the message string. So you can change classname here to what ever you want and then change it back (in post hook).


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: check entity kill players (worldspawn)
СообщениеДобавлено: 25 янв 2018, 21:56 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
19 мар 2024, 03:43
Сообщения: 1018
Lev писал(а):
Woot? As usual, I don't understand you. :D
Yeah, its google + my R.I.P Eng = another language :crazy:
myb it should be :
i want make for water entity ID (This is what I mean by giving a name to the entity that is the water)
Lev писал(а):
abdobiskra писал(а):
I want to replace the name of the weapon
Hook player TakeDamage, check pevAttacker (second argument), if not player, store pevInflictor (first argument) globally, if player, clear global variable.
Hook player Killed, if pevInflictor is filled, then it is not player killed player and classname of killer entity (pevInflictor) will be used to form the message string. So you can change classname here to what ever you want and then change it back (in post hook).
Yes, I will try one of them.

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему  [ Сообщений: 9 ] 

Часовой пояс: UTC + 5 часов [ Летнее время ]


Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Найти:
Перейти:  
cron
Создано на основе phpBB® Forum Software © phpBB Group
Русская поддержка phpBB