Jump to content
JokerosPL

Cop rank name display with nickname

Recommended Posts

Hi, Running an Altis life 5.0, on dedicated server.

Trying to figure out what is the maximum icon size for Cop rank, and how to make the rank appear with nickname "[Sergeant icon] Sergeant John Blackbeard in fn_playertag

Any ideas ? :D

 

Best Regards,

 

Artur

Share this post


Link to post
Share on other sites

Something like this? This is the police statement inside fn_playerTags.sqf.

// -- fn_playerTags.sqf (West statement).
case (side _x isEqualTo west && {!isNil {_x getVariable "rank"}}): { // -- Police only.
    format ["<img image='%1'/><t font='PuristaLight'>%2 %3</t>", // -- Icon, rank, name.
    switch (_x getVariable "rank") do { // -- Get rank icon.
        case 2: {"\a3\ui_f\data\gui\cfg\Ranks\corporal_gs.paa"};
        case 3: {"\a3\ui_f\data\gui\cfg\Ranks\sergeant_gs.paa"};
        case 4: {"\a3\ui_f\data\gui\cfg\Ranks\lieutenant_gs.paa"};
        case 5: {"\a3\ui_f\data\gui\cfg\Ranks\captain_gs.paa"};
        case 6: {"\a3\ui_f\data\gui\cfg\Ranks\major_gs.paa"};
        case 7: {"\a3\ui_f\data\gui\cfg\Ranks\colonel_gs.paa"};
        case 8: {"\a3\ui_f\data\gui\cfg\Ranks\general_gs.paa"};
        default {"\a3\ui_f\data\gui\cfg\Ranks\private_gs.paa"};
    },
    switch (_x getVariable "rank") do { // -- Get rank name.
        case 2: {"Corporal"};
        case 3: {"Sergeant"};
        case 4: {"Liteutenat"};
        case 5: {"Captain"};
        case 6: {"Major"};
        case 7: {"Colonel"};
        case 8: {"General"};
        default {"Private"};
    },_x getVariable ["realname",name _x]]
};
 
Edited by AngryHerring ッ ®™
yes
  • Thanks 1

Share this post


Link to post
Share on other sites
19 hours ago, AngryHerring ッ ®™ said:

Something like this? This is the police statement inside fn_playerTags.sqf.

// -- fn_playerTags.sqf (West statement).
case (side _x isEqualTo west && {!isNil {_x getVariable "rank"}}): { // -- Police only.
    format ["<img image='%1'/><t font='PuristaLight'>%2 %3</t>", // -- Icon, rank, name.
    switch (_x getVariable "rank") do { // -- Get rank icon.
        case 2: {"\a3\ui_f\data\gui\cfg\Ranks\corporal_gs.paa"};
        case 3: {"\a3\ui_f\data\gui\cfg\Ranks\sergeant_gs.paa"};
        case 4: {"\a3\ui_f\data\gui\cfg\Ranks\lieutenant_gs.paa"};
        case 5: {"\a3\ui_f\data\gui\cfg\Ranks\captain_gs.paa"};
        case 6: {"\a3\ui_f\data\gui\cfg\Ranks\major_gs.paa"};
        case 7: {"\a3\ui_f\data\gui\cfg\Ranks\colonel_gs.paa"};
        case 8: {"\a3\ui_f\data\gui\cfg\Ranks\general_gs.paa"};
        default {"\a3\ui_f\data\gui\cfg\Ranks\private_gs.paa"};
    },
    switch (_x getVariable "rank") do { // -- Get rank name.
        case 2: {"Corporal"};
        case 3: {"Sergeant"};
        case 4: {"Liteutenat"};
        case 5: {"Captain"};
        case 6: {"Major"};
        case 7: {"Colonel"};
        case 8: {"General"};
        default {"Private"};
    },_x getVariable ["realname",name _x]]
};
 

Perhaprs When i Log in, the others see ONLY the Rank, I woudlike The rank + nickname :/

Share this post


Link to post
Share on other sites
On 1/20/2020 at 5:17 PM, JokerosPL said:

Yup the player name dosr not showup

Not sure. I'd check your RPTs for errors (specifically the client when looking at a cop), but the script seems to be including the name.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.