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

Team Score HLTDM !
http://aghl.ru/forum/viewtopic.php?f=12&t=2065
Страница 1 из 4

Автор:  abdobiskra [ 02 фев 2015, 03:09 ]
Заголовок сообщения:  Team Score HLTDM !

Is there a plugin Team Score HL !
Or do any of you help me in this and make it work !
Код:
#include <amxmodx>
#include <amxmisc>
#include <dhudmessage>
#include <hl>

#define PLUGIN   "Team Score"
#define VERSION   "1.0"
#define AUTHOR   "BaRSiK"

new Batman_score, IronMan_score;

public plugin_init()
{
   register_plugin(PLUGIN, VERSION, AUTHOR);
   register_event("TeamScore", "team_score", "a");
   set_task(1.0,"score_round",_,_,_,"b")
}

public team_score()
{
   new team[32];
   read_data(1,team,31);
   if (equal(team,"Batman"))
   {
      Batman_score = read_data(2);
   }
   else if (equal(team,"IronMan"))
   {
      IronMan_score = read_data(2);
   }
}
   
public score_round()
{
   set_dhudmessage(0, 70, 200, -1.0, 0.0, 0, 0.5, 2.0, 0.08, 2.0, true);
   show_dhudmessage(0,"Batman :%d|                       ", Batman_score);
   
   set_dhudmessage(200, 0, 0, -1.0, 0.0, 0, 0.5, 2.0, 0.08, 2.0, true);
   show_dhudmessage(0,"                       |%d: IronMan", IronMan_score);
}

Автор:  Lev [ 02 фев 2015, 05:17 ]
Заголовок сообщения:  Re: Team Score HLTDM !

Not sure what you want from it.

Автор:  abdobiskra [ 02 фев 2015, 12:52 ]
Заголовок сообщения:  Re: Team Score HLTDM !

I want to calculate statistics for Kill each team and see it in the form of a HUD message
But this plugin does not work at the expense of these statistics
Is it possible to know the fault?
Or is there another one can be tested?
Вложение:
Capture.PNG
Capture.PNG [ 74.88 КБ | Просмотров: 5397 ]

Автор:  Lev [ 02 фев 2015, 16:07 ]
Заголовок сообщения:  Re: Team Score HLTDM !

Show mp_teamlist from the server.

Автор:  abdobiskra [ 02 фев 2015, 16:24 ]
Заголовок сообщения:  Re: Team Score HLTDM !

Код:
mp_teamlist "Batman;IronMan"

Автор:  unnamed [ 02 фев 2015, 17:24 ]
Заголовок сообщения:  Re: Team Score HLTDM !

TeamScore message is not used in HL.
Server never sends it. You should calculate frags for each team.

Автор:  abdobiskra [ 02 фев 2015, 18:25 ]
Заголовок сообщения:  Re: Team Score HLTDM !

Can you modify it to calculate frags !

Автор:  Kuma77 [ 04 фев 2015, 23:18 ]
Заголовок сообщения:  Re: Team Score HLTDM !

abdobiskra писал(а):
Can you modify it to calculate frags !

here it is :

i calculate frags with DeathMsg i think its bad idea but its work fine
Код:
public DeathMessage() 
{
    new iKiller = get_msg_arg_int(1)
   
    new iAdd = 1
    if(hl_get_user_team(iKiller) == TEAM_BLUE )
    {
   ScoreBlue += iAdd
        client_print(0, print_chat, "you are blue with %d", ScoreBlue)
    }
    if( hl_get_user_team(iKiller) == TEAM_RED )
    {
        ScoreRed += iAdd
        client_print(0, print_chat, "you are red with %d", ScoreRed)
    }
}

try this its work for me to get each teams frags if you have Iron-Man is blue team then just change this

Код:
public score_round()
{
 
   set_dhudmessage(0, 70, 200, -1.0, 0.0, 0, 0.5, 1.1, 0.08, 1.1, true)
   show_dhudmessage(0,"Batman :%d|                       ", ScoreBlue);
   
   set_dhudmessage(200, 0, 0, -1.0, 0.0, 0, 0.5, 2.0, 0.08, 2.0, true);
   show_dhudmessage(0,"                       |%d: IronMan", ScoreRed);
}

To

Код:
{
 
   set_dhudmessage(0, 70, 200, -1.0, 0.0, 0, 0.5, 1.1, 0.08, 1.1, true)
   show_dhudmessage(0,"IronMan :%d|                       ", ScoreBlue);
   
   set_dhudmessage(200, 0, 0, -1.0, 0.0, 0, 0.5, 2.0, 0.08, 2.0, true);
   show_dhudmessage(0,"                       |%d: Batman", ScoreRed);
}


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

Автор:  abdobiskra [ 04 фев 2015, 23:39 ]
Заголовок сообщения:  Re: Team Score HLTDM !

Thank you very much it works well :D :good: :friends:

Автор:  Kuma77 [ 05 фев 2015, 03:08 ]
Заголовок сообщения:  Re: Team Score HLTDM !

abdobiskra писал(а):
Thank you very much it works well :D :good: :friends:
abdobiskra

Make sure you OFF Friendly Fire , becouse this plugin make +1 frag by killing whatever your team or enemy.

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