Raised This Month: $ Target: $400
 0% 

2D array with strings


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-20-2013 , 16:06   2D array with strings
Reply With Quote #1

PHP Code:
new const g_IconNames[31][] = 
{
    
"",
    
"p228",
    
""// shield
    
"scout",
    
"hegrenade",
    
"xm1014",
    
""// c4
    
"mac10",
    
"aug",
    
"smokegrenade",
    
"elites",
    
"fiveseven",
    
"ump45",
    
"sg550",
    
"galil",
    
"famas",
    
"usp45",
    
"glock18",
    
"awp",
    
"mp5",
    
"m249",
    
"m3",
    
"m4a1",
    
"tmp",
    
"g3sg1",
    
"flashbang",
    
"deagle",
    
"sg552",
    
"ak47",
    
"not_available"// knife
    
"p90"
}

enum _:DeadData
{
    
g_KilledBy,
    
g_KilledWeap,
    
g_KilledTime
}

On client death:
g_StoredInfo[victim][g_KilledWeap] = get_user_weapon(killer
When I kill with glock, g_StoredInfo[victim][g_KilledWeap] shows 18 which is right, but when I do g_IconNames[g_StoredInfo[victim][g_KilledWeap]] it shows me 103 but it should show me the string which is glock18, right? What I'm doing wrong? :/
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness

Last edited by GuskiS; 07-20-2013 at 16:07.
GuskiS 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 06:29.


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