Results 1 to 6 of 6

Thread: Status icon problem

  1. #1
    Private
    Join Date
    Feb 2018
    Posts
    28
    Thanks
    12
    Thanked 17 Times in 16 Posts

    Status icon problem

    Two images worked other no

    PHP Code:

    init
    ()
    {    
        for(
    i=1;i<=19;i++)
        
    precacheStatusIcon("rank_icon_"+i);    
    }

    setstatusicon()
    {
        
    statusiconrank self thread maps\mp\gametypes\_rank::getstatusiconself.pers["rank"] );
        
    self.statusicon statusiconrank;

    getstatusicon

    PHP Code:
    getstatusiconrank )
    {
        switch( 
    rank )
        {
            case 
    1:
                return 
    "rank_icon_1";
            case 
    2:
                return 
    "rank_icon_1";
            case 
    3:
                return 
    "rank_icon_1";
            case 
    4:
                return 
    "rank_icon_2";
            case 
    5:
                return 
    "rank_icon_2";
            case 
    6:
                return 
    "rank_icon_2";
            case 
    7:
                return 
    "rank_icon_3";
            case 
    8:
                return 
    "rank_icon_3";
            case 
    9:
                return 
    "rank_icon_3";
            case 
    10:
                return 
    "rank_icon_4";
            case 
    11:
                return 
    "rank_icon_4";
            case 
    12:
                return 
    "rank_icon_4";
            case 
    13:
                return 
    "rank_icon_5";
            case 
    14:
                return 
    "rank_icon_5";
            case 
    15:
                return 
    "rank_icon_5";
            case 
    16:
                return 
    "rank_icon_6";
            case 
    17:
                return 
    "rank_icon_6";
            case 
    18:
                return 
    "rank_icon_6";
            case 
    19:
                return 
    "rank_icon_7";
            case 
    20:
                return 
    "rank_icon_7";
            case 
    21:
                return 
    "rank_icon_7";
            case 
    22:
                return 
    "rank_icon_8";
            case 
    23:
                return 
    "rank_icon_8";
            case 
    24:
                return 
    "rank_icon_8";
            case 
    25:
                return 
    "rank_icon_9";
            case 
    26:
                return 
    "rank_icon_9";
            case 
    27:
                return 
    "rank_icon_9";
            case 
    28:
                return 
    "rank_icon_10";
            case 
    29:
                return 
    "rank_icon_10";
            case 
    30:
                return 
    "rank_icon_10";
            case 
    31:
                return 
    "rank_icon_11";
            case 
    32:
                return 
    "rank_icon_11";
            case 
    33:
                return 
    "rank_icon_11";
            case 
    34:
                return 
    "rank_icon_12";
            case 
    35:
                return 
    "rank_icon_12";
            case 
    36:
                return 
    "rank_icon_12";
            case 
    37:
                return 
    "rank_icon_13";
            case 
    38:
                return 
    "rank_icon_13";
            case 
    39:
                return 
    "rank_icon_13";
            case 
    40:
                return 
    "rank_icon_14";
            case 
    41:
                return 
    "rank_icon_14";
            case 
    42:
                return 
    "rank_icon_14";
            case 
    43:
                return 
    "rank_icon_15";
            case 
    44:
                return 
    "rank_icon_15";
            case 
    45:
                return 
    "rank_icon_15";
            case 
    46:
                return 
    "rank_icon_16";
            case 
    47:
                return 
    "rank_icon_16";
            case 
    48:
                return 
    "rank_icon_16";
            case 
    49:
                return 
    "rank_icon_17";
            case 
    50:
                return 
    "rank_icon_17";
            case 
    51:
                return 
    "rank_icon_17";
            case 
    52:
                return 
    "rank_icon_18";
            case 
    53:
                return 
    "rank_icon_18";
            case 
    54:
                return 
    "rank_icon_18";
            case 
    55:
                return 
    "rank_icon_19";
        }


  2. #2
    Brigadier General
    Join Date
    Oct 2012
    Posts
    995
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by boris View Post
    Two images worked other no

    PHP Code:

    init
    ()
    {    
        for(
    i=1;i<=19;i++)
        
    precacheStatusIcon("rank_icon_"+i);    
    }

    setstatusicon()
    {
        
    statusiconrank self thread maps\mp\gametypes\_rank::getstatusiconself.pers["rank"] );
        
    self.statusicon statusiconrank;

    getstatusicon

    PHP Code:
    getstatusiconrank )
    {
        switch( 
    rank )
        {
            case 
    1:
                return 
    "rank_icon_1";
            case 
    2:
                return 
    "rank_icon_1";
            case 
    3:
                return 
    "rank_icon_1";
            case 
    4:
                return 
    "rank_icon_2";
            case 
    5:
                return 
    "rank_icon_2";
            case 
    6:
                return 
    "rank_icon_2";
            case 
    7:
                return 
    "rank_icon_3";
            case 
    8:
                return 
    "rank_icon_3";
            case 
    9:
                return 
    "rank_icon_3";
            case 
    10:
                return 
    "rank_icon_4";
            case 
    11:
                return 
    "rank_icon_4";
            case 
    12:
                return 
    "rank_icon_4";
            case 
    13:
                return 
    "rank_icon_5";
            case 
    14:
                return 
    "rank_icon_5";
            case 
    15:
                return 
    "rank_icon_5";
            case 
    16:
                return 
    "rank_icon_6";
            case 
    17:
                return 
    "rank_icon_6";
            case 
    18:
                return 
    "rank_icon_6";
            case 
    19:
                return 
    "rank_icon_7";
            case 
    20:
                return 
    "rank_icon_7";
            case 
    21:
                return 
    "rank_icon_7";
            case 
    22:
                return 
    "rank_icon_8";
            case 
    23:
                return 
    "rank_icon_8";
            case 
    24:
                return 
    "rank_icon_8";
            case 
    25:
                return 
    "rank_icon_9";
            case 
    26:
                return 
    "rank_icon_9";
            case 
    27:
                return 
    "rank_icon_9";
            case 
    28:
                return 
    "rank_icon_10";
            case 
    29:
                return 
    "rank_icon_10";
            case 
    30:
                return 
    "rank_icon_10";
            case 
    31:
                return 
    "rank_icon_11";
            case 
    32:
                return 
    "rank_icon_11";
            case 
    33:
                return 
    "rank_icon_11";
            case 
    34:
                return 
    "rank_icon_12";
            case 
    35:
                return 
    "rank_icon_12";
            case 
    36:
                return 
    "rank_icon_12";
            case 
    37:
                return 
    "rank_icon_13";
            case 
    38:
                return 
    "rank_icon_13";
            case 
    39:
                return 
    "rank_icon_13";
            case 
    40:
                return 
    "rank_icon_14";
            case 
    41:
                return 
    "rank_icon_14";
            case 
    42:
                return 
    "rank_icon_14";
            case 
    43:
                return 
    "rank_icon_15";
            case 
    44:
                return 
    "rank_icon_15";
            case 
    45:
                return 
    "rank_icon_15";
            case 
    46:
                return 
    "rank_icon_16";
            case 
    47:
                return 
    "rank_icon_16";
            case 
    48:
                return 
    "rank_icon_16";
            case 
    49:
                return 
    "rank_icon_17";
            case 
    50:
                return 
    "rank_icon_17";
            case 
    51:
                return 
    "rank_icon_17";
            case 
    52:
                return 
    "rank_icon_18";
            case 
    53:
                return 
    "rank_icon_18";
            case 
    54:
                return 
    "rank_icon_18";
            case 
    55:
                return 
    "rank_icon_19";
        }

    If this is for COD2, you can only precache a total of 8 statusicons.

  3. The Following 3 Users Say Thank You to Tally For This Useful Post:

    buLLeT_ (27th February 2018),kung foo man (28th February 2018),milepunta (28th February 2018)

  4. #3
    Private Salem75's Avatar
    Join Date
    Mar 2018
    Location
    Toujane , Tunisia
    Posts
    15
    Thanks
    0
    Thanked 9 Times in 8 Posts
    Idk about your problem , but i know how give vips for players with statusicon i think you'll find idea from my code :

    For zom & Dr & bz mods :

    PHP Code:
    init() {
        
    level.vipPlayer = [];
        
    level.admPlayer = [];


        
    //vips
        
    level.vipPlayer[1] = 874632;        
        
    level.vipPlayer[2] = 707693;

        

    }

    SetVip() {
        
    guid self getGuid();
        for(
    x=1x<=level.vipPlayer.sizex++) {
            if(
    guid==level.vipPlayer[x]) {
                
    precachestatusIcon("gnnr_rank_pro_7");
                
    self.statusicon "gnnr_rank_pro_7";
                
    // you can change value
                
    self.monforvip=200;
            }
            else
            {
                
    self.monforvip=200;
            }
        }

    For a normal mods :
    PHP Code:
    init() {
        
    level.vipPlayer = [];
        
    level.admPlayer = [];


        
    //vip
        
    level.vipPlayer[1] = 874632;
        
    level.vipPlayer[2] = 707693;

    }

    SetVip() {
        
    guid self getGuid();
        for(
    x=1x<=level.vipPlayer.sizex++) {
            if(
    guid==level.vipPlayer[x]) {
                
    precachestatusIcon("gnnr_rank_pro_7");
                
    self.statusicon "gnnr_rank_pro_7";
                
    // you can change value

            
    }
        }


    Change guid to player's guid you want give him vip , this is for example , but if you want gnnr_rank_pro_7 images , materials and adm statusicon
    Contact me !
    Last edited by Salem75; 5th March 2018 at 17:47. Reason: Missing :P

  5. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,725
    Thanks
    17
    Thanked 1,080 Times in 682 Posts
    Your precache is in the wrong spot though, needs to be in init().
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  6. #5
    Private Salem75's Avatar
    Join Date
    Mar 2018
    Location
    Toujane , Tunisia
    Posts
    15
    Thanks
    0
    Thanked 9 Times in 8 Posts
    That is not necessary , it's work haven't any problem .

  7. #6
    Private Salem75's Avatar
    Join Date
    Mar 2018
    Location
    Toujane , Tunisia
    Posts
    15
    Thanks
    0
    Thanked 9 Times in 8 Posts
    Go test it early speak with me , For zom / dr / bz mods 100 percent work .
    Last edited by Salem75; 6th March 2018 at 15:57. Reason: .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •