1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73. | //Bf2 Rank Mod HUD File
//Contains all the HUD functions.
#if defined bf2_hud_included
#endinput
#endif
#define bf2_hud_included
//Show an announcement display
public Announcement(id)
{
if ( !get_pcvar_num(gPcvarBF2Active) || is_user_bot(id) ) return;
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"[BF2]^x03 Ten serwer uzywa^x04 %s.^x03 Wpisz^x04 ^"/bf2menu^"^x03 aby uzyskac wiecej informacji", gPluginName);
#else
client_print(id, print_chat, "[BF2] Ten serwer uzywa %s. Wpisz ^"/bf2menu^" aby uzyskac wiecej informacji", gPluginName);
#endif
}
//Displays the HUD to the user
public DisplayHUD(id)
{
id -= TASK_HUD;
if ( !get_pcvar_num(gPcvarBF2Active) || !get_pcvar_num(gPcvarStatusText) )
return;
if ( !is_user_alive(id) || is_user_bot(id) )
return;
if(!is_user_connected(id))
{
remove_task(id+TASK_HUD);
return;
}
set_hudmessage(227, 96, 8, 0.05, 0.15, 0, 0.0, 0.3, 0.0, 0.0, 3)
if ( !gStatsLoaded[id] )
{
ShowSyncHudMsg(id, gHUD,"[%s] Wczytuje Dane...", gPluginName)
}
else
{
new rank = g_PlayerRank[id];
new nextrank;
switch(rank)
{
case 16, 19, 20, 21: nextrank = 15;
case 17: nextrank = 7;
case 18: nextrank = 8;
default: nextrank = rank;
}
++nextrank;
new nextrankxp = floatround(gRankXP[nextrank] * get_pcvar_float(gPcvarXpMultiplier));
if ( !get_pcvar_num(gPcvarBadgesActive) )
{
ShowSyncHudMsg(id, gHUD,"[%s]^nRanga: %s^nZabicia: %d/%d", gPluginName, gRankName[rank], totalkills[id], nextrankxp)
}
else
{
ShowSyncHudMsg(id, gHUD,"[%s]^nRanga: %s^nIlosc Odznak: %d^nZabicia: %d/%d", gPluginName, gRankName[rank], numofbadges[id], totalkills[id], nextrankxp)
}
}
}
public RemoveHUD(id)
{
remove_task(id+TASK_HUD);
} |