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(szRankName, charsmax(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));
}
__________________