Raised This Month: $ Target: $400
 0% 

help to return an array through a native


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 03-20-2011 , 06:59   Re: help to return an array through a native
Reply With Quote #6

PHP Code:
new const CLASSNAMES[][] =
{
    
"NEMESIS",
    
"ASSASSIN",
    
"ZOMBIE",
    
"SURVIVOR",
    
"SNIPER",
    
"HUMAN"
}

public 
native_zp_get_user_class_name(id)
{
    static 
x
    
    
if (g_zombie[id])
    {
        if (
g_nemesis[id])
            
0    // NEMESIS
        
        
if (g_assassin[id])
            
1    // ASSASSIN
        
        
else
            
2    // ZOMBIE
    
}
    
    else
    {
        if (
g_survivor[id])
            
3    // SURVIVOR
        
        
if (g_sniper[id])
            
4    // SNIPER
        
        
if (!g_survivor[id] && !g_sniper[id])
            
5    // HUMAN
    
}
    
    return 
CLASSNAMES[x]

__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
 



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 14:32.


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