Raised This Month: $ Target: $400
 0% 

Solved Native: get_user_rank


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-29-2020 , 15:37   Re: Native: get_user_rank
Reply With Quote #1

Quote:
Originally Posted by HamletEagle View Post
"the old one"
Style 0 is not "old", in fact it is what you should use. Style 1 is deprecated, do not use it.
OP, just switch to style 0 natives, no point in trying to fix code you shouldn't write in the first place.
Then read this: https://forums.alliedmods.net/showthread.php?t=41251

P.S: enable debug already. Don't post error logs with debug disabled, they are useless.
I did it but rank name didn't show



.inc
Quote:
/**
* Returns the client's current rank.
*
* @param id Client index.
* @param buffer Buffer to store the rank name in.
* @param len Maximum buffer length.
* @noreturn
*/

native get_user_rank(id)
PHP Code:

public plugin_natives()
{
    
register_library("levels")
    
register_native("get_user_rank""_get_user_rank"1)
}


public 
_get_user_rank(iPlugin,iParams)
{
    if(
iParams != 1)
        return 
PLUGIN_CONTINUE
        
    
new id get_param(1)
    if(!
id)
        return 
PLUGIN_CONTINUE;
        
    
set_string(idg_mPlayerDatag_iPlayerLevelid ] ][ m_szRankName ], 2)
    
    return 
PLUGIN_CONTINUE



Last edited by Supremache; 06-29-2020 at 15:38.
Supremache is offline
Reply



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