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

Spectator mod ?
http://aghl.ru/forum/viewtopic.php?f=12&t=2620
Страница 2 из 5

Автор:  abdobiskra [ 18 янв 2017, 15:27 ]
Заголовок сообщения:  Re: Spectator mod ?

Lev писал(а):
I am not sure what problem you have. Try to describe more straightforward.

Problem when i use your code is not selected team after spawn like in image up
Unfortunately i can know unscathed want to explain it exactly?
Perhaps this example will make you understand my problem more when tested

Lev писал(а):
Also, you can try to provide small plugin that can be used to reproduce a problem.

 

Автор:  Lev [ 18 янв 2017, 15:38 ]
Заголовок сообщения:  Re: Spectator mod ?

The problem is that you use hl_user_spawn(i), but you should hl_set_user_spectator(id,false).
Also, take into account that in BugfixedHL "spectate" command is rate limited (1 per 5 seconds by default). You can adjust it via spectator_cmd_delay cvar, but minimum is 1 sec.

Автор:  abdobiskra [ 18 янв 2017, 15:53 ]
Заголовок сообщения:  Re: Spectator mod ?

the same problem(
 

spectator_cmd_delay 1

Автор:  Lev [ 18 янв 2017, 16:29 ]
Заголовок сообщения:  Re: Spectator mod ?

Код:
      hl_set_user_spectator(i,false)
      set_user_team(i,"blue",false,false) // dont forget to add blue in team list !

Автор:  abdobiskra [ 18 янв 2017, 16:46 ]
Заголовок сообщения:  Re: Spectator mod ?

yes i do nothing has changed
 

Автор:  Lev [ 18 янв 2017, 17:01 ]
Заголовок сообщения:  Re: Spectator mod ?

Try to remove
Код:
         set_user_team(i,"sas",false,false) // dont forget to add blue in team list !

Автор:  abdobiskra [ 18 янв 2017, 17:04 ]
Заголовок сообщения:  Re: Spectator mod ?

No result well

Автор:  Lev [ 18 янв 2017, 19:29 ]
Заголовок сообщения:  Re: Spectator mod ?

So, if I got correctly, you are switching players to spectate in putinserver and after 7 seconds issue hl_set_user_spectator(i,false) to them and they are incorrectly showing up in scoreboard, right?
Can you supply me with such a small plugin for testing?

Автор:  abdobiskra [ 18 янв 2017, 20:26 ]
Заголовок сообщения:  Re: Spectator mod ?

Lev писал(а):
So, if I got correctly, you are switching players to spectate in putinserver and after 7 seconds issue hl_set_user_spectator(i,false) to them and they are incorrectly showing up in scoreboard, right?
Yes the big problem in this scoreboard (dont see teams name and when joined in server after this 7 sec show all spectator in scoreboard but all players alive in the server ) this 7 sec its time to start rounds
this problem when i used putinserver function but in function first spawn worked whithout problem in scoreboard only the problem in when player killed i want him get spectator mod, i think it's the perfect solution if there is a way to solve the problem (player killed to spec mod)
Lev писал(а):
Can you supply me with such a small plugin for testing?
i think this is a brief by far because everything is interconnected seamlessly
Вложение:
Скачать плагин или Скачать исходник [SPECTATE2.sma - 2.89 КБ]
Скачиваний: 378

Автор:  Lev [ 18 янв 2017, 21:05 ]
Заголовок сообщения:  Re: Spectator mod ?

Код:
#include <amxmisc>
#include <hl>

public client_putinserver(id)
{
   hl_set_user_spectator(id, true);
   set_task(10.0, "toggle", id);
}

public toggle(id)
{
   hl_set_user_spectator(id, false);
}

Here what I am about. Run it with mp_welcomecam 1 and 0. See the difference.

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