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.
|
Rangi BF2 Kolor
#1
Napisano 01.06.2009 11:58
Otóż mam kolejny problem a raczej chęć zmienienia koloru tego napisu: Zabić: xx Rangi: xx Odznaki: xx
Na np:
Zabić(zielony) xx (standard) Rangi(zielony) xx(standard) itd
W jaki sposób to zrobić?
#2
Napisano 01.06.2009 13:50
#3
Napisano 01.06.2009 15:35
#4
Gość__*
Napisano 01.06.2009 15:46
#5
Napisano 01.06.2009 16:21
public DisplayHUD(id)
{
if (!is_user_alive(id) || is_user_bot(id))
return;
new HUD[64]
if (!get_pcvar_num(g_badges_active))
{
format(HUD, 63, "[Mordownia] Zabic: %d/%d Ranga: %s ",totalkills[id],nextrank[id],RANKS[g_PlayerRank[id]])
message_begin(MSG_ONE_UNRELIABLE, gmsgStatusText, {0,0,0}, id)
write_byte(0)
write_string(HUD)
message_end()
}
else
{
format(HUD, 63, "[Mordownia] Zabic: %d/%d Odznaki: %d Ranga: %s ",totalkills[id],nextrank[id],numofbadges[id],RANKS[g_PlayerRank[id]])
message_begin(MSG_ONE_UNRELIABLE, gmsgStatusText, {0,0,0}, id)
write_byte(0)
write_string(HUD)
message_end()
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{ rtf1 ansi deff0{ fonttbl{ f0 fnil Tahoma;}}n viewkind4 uc1 pard lang1045 f0 fs16 n par }
*/
A chciałbym żeby to wyglądało tak:
[Mordownia] Zabic: %d/%d Odznaki: %d Ranga: %s
#6
Napisano 01.06.2009 16:53
- bialy
- zolty
- zielony
- kolor teamu (czerwony dla TT i niebieski dla CT)
Wspominam o tym, bo chcesz miec czerwony napis mordownia a to nie zawsze sie uda :>
#7
Napisano 01.06.2009 17:15
Tylko pokażcie jak zrobić..
#8
Napisano 01.06.2009 17:46
^x02 yellow
^x03 team
^x04 green
czyli:
"^x03[Mordownia] ^x04Zabic: ^x01%d/%d ^x04Odznaki: ^x01%d ^x04Ranga: ^x01%s"
#9
Napisano 02.06.2009 10:16
#10
Napisano 02.06.2009 16:11
#12
Napisano 02.06.2009 16:20
public DisplayHUD(id)
{
if (!is_user_alive(id) || is_user_bot(id))
return;
new HUD[64]
if (!get_pcvar_num(g_badges_active))
{
format(HUD, 63, "^x03[Mordownia] ^x04Zabic: ^x01%d/%d ^x04Ranga: ^x01%s",totalkills[id],nextrank[id],RANKS[g_PlayerRank[id]])
message_begin(MSG_ONE_UNRELIABLE, gmsgStatusText, {0,0,0}, id)
write_byte(0)
write_string(HUD)
message_end()
}
else
{
format(HUD, 63, "^x03[Mordownia] ^x04Zabic: ^x01%d/%d ^x04Odznaki: ^x01%d ^x04Ranga: ^x01%s",totalkills[id],nextrank[id],numofbadges[id],RANKS[g_PlayerRank[id]])
message_begin(MSG_ONE_UNRELIABLE, gmsgStatusText, {0,0,0}, id)
write_byte(0)
write_string(HUD)
message_end()
}
}?
#13
Napisano 02.06.2009 16:43
#14
Napisano 02.06.2009 16:54
write_byte( id );
write_string( HUD );
message_end( );
Uzyj tego messaga bo chyba to jest problem...
#15
Napisano 02.06.2009 17:53
//Displays the HUD to the user
public DisplayHUD(id)
{
if (!is_user_alive(id) || is_user_bot(id))
return;
new HUD[64]
if (!get_pcvar_num(g_badges_active))
{
format(HUD, 63, "^x03[Mordownia] ^x04Zabic: ^x01%d/%d ^x04Ranga: ^x01%s ",totalkills[id],nextrank[id],RANKS[g_PlayerRank[id]])
message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), { 0, 0, 0 }, id );
write_byte( id );
write_string( HUD );
message_end( );
}
else
{
format(HUD, 63, "^x03[Mordownia] ^x04Zabic: ^x01%d/%d ^x04Odznaki: ^x01%d ^x04Ranga: ^x01%s ",totalkills[id],nextrank[id],numofbadges[id],RANKS[g_PlayerRank[id]])
message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), { 0, 0, 0 }, id );
write_byte( id );
write_string( HUD );
message_end( ) ;
}
}
I przy kompilacji piszę że ma problem z identyfikacją lecz skompiluje się.
I o to wynik:
Problem jest taki że to jest chyba jako wiadomość say i po chwili znika.
#16
Napisano 02.06.2009 18:30
#17
Napisano 02.06.2009 21:25
Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team Header size: 4088 bytes Code size: 83836 bytes Data size: 59076 bytes Stack/heap size: 16384 bytes; max. usage is unknown, due to recursion Total requirements: 163384 bytes Done.
mój kod:
public DisplayHUD(id)
{
if (!is_user_alive(id) || is_user_bot(id))
return;
new HUD[64]
if (!get_pcvar_num(g_badges_active))
{
format(HUD, 63, "^x02[^x03PzB^x02] ^x04Zabicia: ^x01%d^x04/^x01%d ^x04Ranga: ^x03%s ",totalkills[id],nextrank[id],RANKS[g_PlayerRank[id]])
message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), { 0, 0, 0 }, id );
write_byte( id );
write_string( HUD );
message_end( );
}
else
{
format(HUD, 63, "^x02[^x03PzB^x02] ^x04Zabicia: ^x01%d^x04/^x01%d ^x04Odznaki: ^x01%d ^x04Ranga: ^x03%s ",totalkills[id],nextrank[id],numofbadges[id],RANKS[g_PlayerRank[id]])
message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), { 0, 0, 0 }, id );
write_byte( id );
write_string( HUD );
message_end( );
}
}
#18
Napisano 03.06.2009 13:48
#19
Napisano 03.06.2009 14:12
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych


Dodatki SourceMod



Temat jest zamknięty









