Maybe this is what you want. Try it
function<TAB>script<TAB>Func_RefreshRank<TAB>{
switch ( rank_level ) {
case 1: .@rank_title$ = "Seasonal"; break;
case 2: .@rank_title$ = "Addicted"; break;
case 3: .@rank_title$ = "Pro"; break;
case 4: .@rank_title$ = "God"; break;
default:
.@rank_title$ = "Newbie";
break;
}
atcommand "@fakename "+strcharinfo(0)+" - "+.@rank_title$;
return;
}
Just simply run this function "Func_RefreshRank" after you change your rank_level variable.
Maybe you need this too. A suggestion:
This will auto change the name for you when character enter a map.
-<TAB>script<TAB>RankSystem<TAB>-1,{
OnPCLoadMapEvent:
Func_RefreshRank();
}