Raised This Month: $ Target: $400
 0% 

Solved Native: get_user_rank


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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 17:11.


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