Raised This Month: $ Target: $400
 0% 

Need Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 01-10-2013 , 05:07   Re: Need Help
Reply With Quote #2

in plugin which have native body you should register this native inside
PHP Code:
public plugin_natives()
{
  
register_native("get_user_lvl","native_get_user_lvl");
}
public 
native_get_user_lvl(plugin,params

    return 
UserData[get_param(1)][gLevel]; 

public 
native_get_user_rankname(plugin,params

    static 
szRankName[64]; 
    
format(szRankNamecharsmax(szRankName), "%L",LANG_PLAYER,gRankNames[UserData[get_param(1)][gLevel]]); 
    return 
szRankName


also remember this:
(plugin,params)
..
in other plugin:
you should before init declare the natives.
PHP Code:
native get_user_lvl(id);
native get_user_rankname(id);
public 
plugin_init()
{
  
register_clcmd("say /test","test",_,"displays for test your lvl and rankname");
}
public 
test(id)
{
   
client_print(id,print_chat,"your lvl: %d, rankname: %s"get_user_lvl(id),get_user_rankname(id));

__________________
skype: pavle_ivanof
-=ThQ=-
PRIVATE SUPPORT = PAID SUPPORT

Last edited by AngeIII; 01-10-2013 at 05:10.
AngeIII is offline
Send a message via Skype™ to AngeIII
 



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 13:34.


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