Raised This Month: $ Target: $400
 0% 

help to return an array through a native


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
sk@.@
Senior Member
Join Date: Feb 2010
Location: Hong Kong
Old 03-20-2011 , 06:51   Re: help to return an array through a native
Reply With Quote #5

this is ok?

Code:
public native_get_user_class_name(id, name[], len) 
{    
    if (!is_user_alive(id))
        return 0;

    param_convert(2)

     if (g_zombie[id]) // zombies     
    {        
         if (g_nemesis[id])             
            formatex(name, charsmax(name), "%L", id, "CLASS_NEMESIS")         
        else             
            copy(name, charsmax(name), g_zombie_classname[id])     
    }    
    else // humans     
    {        
        if (g_survivor[id])            
            formatex(name, charsmax(name), "%L", id, "CLASS_SURVIVOR")        
         if (g_sniper[id])            
             formatex(name, charsmax(name), "%L", id, "CLASS_SNIPER")        
        if (!g_survivor[id] && !g_sniper[id])             
            copy(name, charsmax(name), g_human_classname[id])     
    } 

    return 1;
}
__________________
This is my Game-Blog:
http://hsk-game.blogspot.hk/
sk@.@ is offline
Send a message via MSN to sk@.@
 



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