Raised This Month: $ Target: $400
 0% 

Solved weapon names


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 05-02-2021 , 11:51   weapon names
Reply With Quote #1

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)]


Last edited by kww; 05-08-2021 at 12:39.
kww is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode