Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Problem z scoreboard w hud


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
4 odpowiedzi w tym temacie

#1 Rellik #

    Zaawansowany

  • Użytkownik

Reputacja: 13
Początkujący

  • Postów:148
  • Imię:Daniel
  • Lokalizacja:Random
Offline

Napisano 03.11.2014 23:01

Próbuje ogarnąć pewien plugin na wyświetlanie w hudzie ilości graczy w danej drużynie i ile dana drużyna wygrywa... Lecz coś mi nie wychodzi, pokazuje Ct lecz TT już nie... Prosiłbym o pomoc!

 

SS:

e1ZmdFr.png

 

#include <amxmodx>
#include <amxmisc>
 
#define PLUGIN "Scoreboard"
#define VERSION "1.0"
#define AUTHOR "Tester"
 
new TerrorWins
new CounterWins
 
new Terrorists
new CounterTerrorists
 
new SyncHudObj;
 
new Float:g_round_start = -1.0;
 
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
 
set_task(1.0,"HUDUpdate", 0,"",0,"b")
set_task(1.0,"HUDU", 0,"",0,"b")
 
 
SyncHudObj = CreateHudSyncObj();
 
register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin") 
register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")  
 
register_logevent("EventRoundStart", 2, "1=Round_Start");
register_logevent("EventRoundEnd", 2, "1=Round_End");
register_event("TextMsg", "EventRoundRestart", "a", "2&#Game_C", "2&#Game_w");
 
 
 
}
 
 
public HUDUpdate()
{ 
new iPlayers[32]
get_players(iPlayers, Terrorists, "ae", "TERRORIST");
get_players(iPlayers, CounterTerrorists, "ae", "CT");  
 
set_hudmessage(0, 255, 0, 0.2, 0.0, 0, 6.0, 1.0,0.0,0.1,false)
ShowSyncHudMsg(0, SyncHudObj, "Terro [%i] | [%i]", TerrorWins,Terrorists);
}
public HUDU()
{ 
new iPlayers[32]
get_players(iPlayers, Terrorists, "ae", "TERRORIST");
get_players(iPlayers, CounterTerrorists, "ae", "CT");  
 
set_hudmessage(0, 255, 0, 0.6, 0.0, 0, 6.0, 1.0,0.0,0.1,false)
ShowSyncHudMsg(0, SyncHudObj, "[%i] | [%i] CTerro", CounterTerrorists,CounterWins);
}
 
public t_win()
{
TerrorWins++
}
 
public ct_win()
{
CounterWins++
}
public EventRoundEnd()
{
g_round_start = -1.0;
}
 
public EventRoundRestart()
{
g_round_start = -1.0;
}
 

 


  • +
  • -
  • 0

b_350_20_1A1A1A_1A1A1A_ADADAD_1A1A1A.png

b_350_20_1A1A1A_1A1A1A_ADADAD_1A1A1A.png
Nie jestem zaawansowany w dziedzinie AMXMOD-X.
Staram się pomóc na tyle ile potrafię.

Piszę poprawnie po POLSKU.

Psychopaci.Eu


#2 Rellik #

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 13
Początkujący

  • Postów:148
  • Imię:Daniel
  • Lokalizacja:Random
Offline

Napisano 04.11.2014 15:01

Nie mogę edytować... Ogólnie chodzi mi o to, że nie pokazuje hudu terro... Nie wiem co robie źle.. proszę o szybką pomoc. :/ W kodzie nie ma chyba błędu  :crazy: nie jestem zaawansowany więc piszę o pomoc.


Użytkownik FR_Rellik edytował ten post 04.11.2014 15:02

  • +
  • -
  • 0

b_350_20_1A1A1A_1A1A1A_ADADAD_1A1A1A.png

b_350_20_1A1A1A_1A1A1A_ADADAD_1A1A1A.png
Nie jestem zaawansowany w dziedzinie AMXMOD-X.
Staram się pomóc na tyle ile potrafię.

Piszę poprawnie po POLSKU.

Psychopaci.Eu


#3 Dziobak?

    Wszechmogący

  • Power User

Reputacja: 271
Wszechwidzący

  • Postów:645
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Radom
Offline

Napisano 11.11.2014 21:37

a czemu nie tak ?

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Scoreboard"
#define VERSION "1.0"
#define AUTHOR "Tester"

new TerrorWins
new CounterWins

new Terrorists
new CounterTerrorists

new SyncHudObj;

new Float:g_round_start = -1.0;

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	set_task(1.0,"HUD", 0,"",0,"b")
	
	SyncHudObj = CreateHudSyncObj();
	
	register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin") 
	register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")  
	
	register_logevent("EventRoundStart", 2, "1=Round_Start");
	register_logevent("EventRoundEnd", 2, "1=Round_End");
	register_event("TextMsg", "EventRoundRestart", "a", "2&#Game_C", "2&#Game_w");
	
}

public HUD()
{ 
	new iPlayers[32]
	get_players(iPlayers, Terrorists, "ae", "TERRORIST");
	get_players(iPlayers, CounterTerrorists, "ae", "CT");  
	
	set_hudmessage(0, 255, 0, 0.2, 0.0, 0, 6.0, 1.0,0.0,0.1,false)
	ShowSyncHudMsg(0, SyncHudObj, "Terro [%i] | [%i]^nCTerro [%i] | [%i]", TerrorWins,Terrorists, CounterWins, CounterTerrorists);
}
public t_win()
{
	TerrorWins++
}

public ct_win()
{
	CounterWins++
}
public EventRoundEnd()
{
	g_round_start = -1.0;
}

public EventRoundRestart()
{
	g_round_start = -1.0;
}


  • +
  • -
  • 0

#4 Rellik #

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 13
Początkujący

  • Postów:148
  • Imię:Daniel
  • Lokalizacja:Random
Offline

Napisano 12.11.2014 16:15

Chciałbym hud 2 kolorowe. 


  • +
  • -
  • 0

b_350_20_1A1A1A_1A1A1A_ADADAD_1A1A1A.png

b_350_20_1A1A1A_1A1A1A_ADADAD_1A1A1A.png
Nie jestem zaawansowany w dziedzinie AMXMOD-X.
Staram się pomóc na tyle ile potrafię.

Piszę poprawnie po POLSKU.

Psychopaci.Eu


#5 Dziobak?

    Wszechmogący

  • Power User

Reputacja: 271
Wszechwidzący

  • Postów:645
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Radom
Offline

Napisano 14.11.2014 18:25

Może tak:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Scoreboard"
#define VERSION "1.0"
#define AUTHOR "Tester"

new TerrorWins
new CounterWins

new Terrorists
new CounterTerrorists

new SyncHudObj;

new Float:g_round_start = -1.0;

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	set_task(1.0,"HUD", 0,"",0,"b")
	
	SyncHudObj = CreateHudSyncObj();
	
	register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin") 
	register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")  
	
	register_logevent("EventRoundStart", 2, "1=Round_Start");
	register_logevent("EventRoundEnd", 2, "1=Round_End");
	register_event("TextMsg", "EventRoundRestart", "a", "2&#Game_C", "2&#Game_w");
	
}

public HUD()
{ 
	new iPlayers[32]
	get_players(iPlayers, Terrorists, "ae", "TERRORIST");
	get_players(iPlayers, CounterTerrorists, "ae", "CT");  
	
	set_hudmessage(0, 255, 0, 0.2, 0.0, 0, 6.0, 1.0,0.0,0.1,false)
	ShowSyncHudMsg(0, SyncHudObj, "CTerro [%i] | [%i]", CounterWins, CounterTerrorists);
	
	set_hudmessage(255, 255, 255, 0.6, 0.0, 0, 6.0, 1.0,0.0,0.1,false)
	ShowSyncHudMsg(0, SyncHudObj, "Terro [%i] | [%i]", TerrorWins,Terrorists);
}
public t_win()
{
	TerrorWins++
}

public ct_win()
{
	CounterWins++
}
public EventRoundEnd()
{
	g_round_start = -1.0;
}

public EventRoundRestart()
{
	g_round_start = -1.0;
}

  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych