Hi! Is it good way to show weapon name in every 0.1 second repeating task?
I'm using @ConnorMcLeod's slightly edited by me (for my needs) "Spectator Hud Information"
https://forums.alliedmods.net/showthread.php?t=157028
PHP Code:
//creating vars
new g_szCurWeapon[MAX_PLAYERS + 1][32] /*number of rows, length of rows*/
new const /*maybe const or not, doesnt matter i guess*/ g_weapons[33][32] = { /*number of rows, length of rows*/
"", // nothing 0
"P250", // CSW_P228 1
"", // 2
"Steyr Scout", // CSW_SCOUT 3
"HE Grenade", // CSW_HEGRENADE 4
"XM1014", // CSW_XM1014 5
"C4 Explosive", // CSW_C4 6
"MAC-10", // CSW_MAC10 7
"AUG", // CSW_AUG 8
"Smoke Grenade", // CSW_SMOKEGRENADE 9
"Dual Berettas", // CSW_ELITE 10
"Five-SeveN", // CSW_FIVESEVEN 11
"UMP-45", // CSW_UMP45 12
"SCAR-20", // CSW_SG550 13
"Galil AR", // CSW_GALIL 14
"FAMAS", // CSW_FAMAS 15
"USP-S", // CSW_USP 16
"Glock-18", // CSW_GLOCK18 17
"AWP", // CSW_AWP 18
"MP5", // CSW_MP5NAVY 19
"M249", // CSW_M249 20
"M3", // CSW_M3 21
"M4A1-S", // CSW_M4A1 22
"Steyr TMP", // CSW_TMP 23
"G3SG1", // CSW_G3SG1 24
"Flashbang", // CSW_FLASHBANG 25
"Desert Eagle", // CSW_DEAGLE 26
"SG 552", // CSW_SG552 27
"AK47", // CSW_AK47 28
"Classic Knife", // CSW_KNIFE 29
"P90", // CSW_P90 30
// can't be obtained
"vest", // CSW_VEST 31
"vest + helmet" // CSW_VESTHELM 32
}
//get weapon name to show it in hud_showmessage()
public Event_CurWeapon(id)
{
g_szCurWeapon[id] = g_weapons[read_data(2)]
}