Okay that's really weird because an hour ago it worked for me and I just changed CMD and then suddenly I do / level it doesn't show me my data = if (! ITarget)
* But shows the data
Quote:
else {
new szName [MAX_NAME_LENGTH];
|
PHP Code:
else if(equali(szArgs[0], "/lvl") || equali(szArgs[0], "/level") || equali(szArgs[0], "/exp") || equali(szArgs[0], "/xp"))
{
if ( szArgs[ 1 ][ 0 ] )
{
if ( !( iTarget = cmd_target( id , szArgs[ 1 ] , CMDTARGET_ALLOW_SELF ) ) )
{
client_print_color( id , id , "%s ^3%s^1 was not found!", PREFIX , szArgs[ 1 ] );
return PLUGIN_HANDLED;
}
}
new iTarget;
iTarget = cmd_target(id, szArgs[1], CMDTARGET_ALLOW_SELF);
if(!iTarget)
client_print_color(id, id, "%s Level: ^4%d ^1| XP: ^4%d^3/^4%d %s",
PREFIX,
g_iUserLevel[id], g_iUserExp[id], g_iUserLevel[id] == MAX_LEVEL ? 0 : g_iExp[g_iUserLevel[id]],
g_iUserLevel[id] == MAX_LEVEL ? "(max level)" : ""
);
else {
new szName[MAX_NAME_LENGTH];
get_user_name(iTarget, szName, charsmax(szName));
client_print_color(id, id, "%s ^3^"%s^3^" ^1level status:", PREFIX, szName);
client_print_color(id, id, "%s Level: ^4%d ^1| XP: ^4%d^1/^4%d %s",
PREFIX,
g_iUserLevel[iTarget], g_iUserExp[iTarget], g_iUserLevel[iTarget] == MAX_LEVEL ? 0 : g_iExp[g_iUserLevel[iTarget]],
g_iUserLevel[iTarget] == MAX_LEVEL ? "(max level)" : ""
);
}
return PLUGIN_HANDLED;
}
I tried to do a backup and it still happens to me .. for some reason I write /lvl
That should show it to me
Code:
client_print_color(id, id, "%s Level: ^4%d ^1 | XP: ^4%d ^3/^4%d%s",
And not the second option