Thread: [Solved] Native: get_user_rank
View Single Post
Author Message
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-29-2020 , 08:12   Native: get_user_rank
Reply With Quote #1

I made Native for get_user_rank but it show me only first word of rank name how to fix it ?



PHP Code:
enum _:mData {
    
m_szRankName32 ],
    
m_iRankXP
};

new const 
g_mPlayerDataMAXLEVEL ][ mData ] = {
    { 
"Private"},
    { 
"Specialist"50 },
    { 
"Corporal"200 },
    { 
"Sargeant"350 },
    { 
"Staff Sargeant"600 },
    { 
"Warrant Officer"1000 },
    { 
"Chief Warrant Officer"1500 },
    { 
"Second Lieutenant"2500 },
    { 
"First Lieutenant"5000 },
    { 
"Captain"8250 },
    { 
"Major"13500 },
    { 
"Colonel"20000 },
    { 
"General"30000 },
    { 
"General of The Army"45000 }
};


public 
plugin_natives()
{
    
register_native("get_user_rank""native_get_user_rank"1)
}

// Native: get_user_rank
public native_get_user_rank(id)
{
    return 
g_mPlayerDatag_iPlayerLevelid ] ][ m_szRankName ]


Last edited by Supremache; 07-02-2020 at 18:11.
Supremache is offline