Half-Life и Adrenaline Gamer форум

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

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




Начать новую тему Ответить на тему  [ Сообщений: 41 ]  На страницу Пред.  1, 2, 3, 4, 5  След.
Автор Сообщение
 Заголовок сообщения: Re: Spectator mod ?
СообщениеДобавлено: 18 янв 2017, 21:15 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
20 мар 2024, 19:47
Сообщения: 1018
Yes i tested (0 / 1) the same result !
 

this after reconnect

Вложение:
20170118161517_1.jpg
20170118161517_1.jpg [ 136.38 КБ | Просмотров: 3765 ]


this after reconnect and spawned :

Вложение:
20170118162201_1.jpg
20170118162201_1.jpg [ 126.48 КБ | Просмотров: 3765 ]


players alive in all image result

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Spectator mod ?
СообщениеДобавлено: 18 янв 2017, 22:02 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
26 мар 2024, 21:42
Сообщения: 6864
Ok, yes, the problem exists if client is just started (HUD never initialized). Not sure what leads to that. I think HUD reset and init messages do not arrive to the client if toggle to spectator happen in putinserver. Dunno if that is AMXX or engine problem.
So, here is workaround that works:
Код:
#include <amxmisc>
#include <hl>

public plugin_init()
{
   register_plugin("Test", "0.0", "Lev");
}
public client_putinserver(id)
{
   set_task(0.1, "toggle1", id);
}
public toggle1(id)
{
   hl_set_user_spectator(id, true);
   set_task(10.0, "toggle2", id);
}
public toggle2(id)
{
   hl_set_user_spectator(id, false);
}
Players will spawn for the moment if mp_welcomcam is 0, but you can leave it at 1.
Don't forget to add various checks like, is_connected, etc...


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Spectator mod ?
СообщениеДобавлено: 18 янв 2017, 22:16 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
20 мар 2024, 19:47
Сообщения: 1018
OK TY FOR YOUR CARING
I think I found another way :
but i need stoped the Ham_spawn function in first spawn (so i need to first spawn only worked this Ham_Spawn)
how i can stoped it ?

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Spectator mod ?
СообщениеДобавлено: 18 янв 2017, 22:23 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
26 мар 2024, 21:42
Сообщения: 6864
I don't understand you. You saying that you found the way, but other text says that you can't go with that, because you are facing some wall.


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Spectator mod ?
СообщениеДобавлено: 18 янв 2017, 22:30 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
20 мар 2024, 19:47
Сообщения: 1018
Unfortunately, but now only come to understand :)

Ps:
ah! i tested your code also its work perfectly now :shock:
the problem in set_task need to set in function client_putinserver :Bravo:
Thank you very much Leo
Solved!

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Spectator mod ?
СообщениеДобавлено: 21 фев 2017, 16:23 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
20 мар 2024, 19:47
Сообщения: 1018
Hi again and sorry for opening this tpc again
bcz i found other problem idk if you can understand me !
when player connected in first connect and set it in spectator and other players play ( this last! mean other players alive )
and when change the map & It is still in the spectator
he cant spawn in new round never?

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Spectator mod ?
СообщениеДобавлено: 21 фев 2017, 19:45 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
26 мар 2024, 21:42
Сообщения: 6864
Dunno. Restarting the server should reset all, so I see no reason for that.


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Spectator mod ?
СообщениеДобавлено: 21 фев 2017, 19:51 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
20 мар 2024, 19:47
Сообщения: 1018
me also did not cause obvious age of the problem and even if I have to restart the server remains the same problem!


Вложения:
Скачать плагин или Скачать исходник [hlround.sma - 10.04 КБ]
Скачиваний: 406

_________________
https://vk.com/kgbaghl
Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Spectator mod ?
СообщениеДобавлено: 21 фев 2017, 22:07 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
26 мар 2024, 21:42
Сообщения: 6864
Код:
public client_disconnect(id)
{
   hl_set_user_spectator(id, false);
No need for this action.

I didn't got the problem completely. Too short description.
Also, you can try to do debug printing in the plugin to get know if this is your code put players into spectate.


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Spectator mod ?
СообщениеДобавлено: 22 фев 2017, 02:29 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
20 мар 2024, 19:47
Сообщения: 1018
Lev писал(а):
Код:
public client_disconnect(id)
{
   hl_set_user_spectator(id, false);
No need for this action.
Yes I try some of the things i forget it :)
Lev писал(а):
I didn't got the problem completely. Too short description.
maybe not been tried with other players because if you tried it on your self the problem will not occur ?
here short video myb explaind better :

Lev писал(а):
Also, you can try to do debug printing in the plugin to get know if this is your code put players into spectate.
Yes i try that now and i did not get the print msg in this problem ?


Вложения:
Скачать плагин или Скачать исходник [hl_round.sma - 10.43 КБ]
Скачиваний: 427

_________________
https://vk.com/kgbaghl
Вернуться к началу
 Профиль 
  
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему  [ Сообщений: 41 ]  На страницу Пред.  1, 2, 3, 4, 5  След.

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


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

Сейчас этот форум просматривают: Bing [Bot] и гости: 6


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

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