AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Need Help] with statxs' colorfix. (https://forums.alliedmods.net/showthread.php?t=155979)

zippel 04-29-2011 06:13

[Need Help] with statxs' colorfix.
 
For example I need to remake output information of /rank.
But I can't do it :'-(
Plz, help me to rewrite the code so that when you type the command /rank you can see colorful statistics.

Code:

public cmdRank(id)
{
    if (!SayRank)
    {
        client_print(id, print_chat, "%L", id, "DISABLED_MSG")
        return PLUGIN_HANDLED
    }

    new izStats[8], izBody[8]
    new iRankPos, iRankMax
    new Float:fEff, Float:fAcc
   
    iRankPos = get_user_stats(id, izStats, izBody)
    iRankMax = get_statsnum()
   
    fEff = effec(izStats)
    fAcc = accuracy(izStats)
   
    client_print(id, print_chat, "%L", id, "YOUR_RANK_IS", iRankPos, iRankMax, izStats[STATS_KILLS], izStats[STATS_HITS], fEff, fAcc)
   
    return PLUGIN_CONTINUE
}

Quote:

mult:
Your rank is %d of %d with %d kill(s), %d hit(s), %0.2f%% eff. and %0.2f%% acc.

Arkshine 04-29-2011 06:15

Re: [Need Help] with statxs' colorfix.
 
https://forums.alliedmods.net/showthread.php?t=94960

.Dare Devil. 04-29-2011 06:24

Re: [Need Help] with statxs' colorfix.
 
http://forums.alliedmods.net/showthr...ight=colorchat

PHP Code:

 
  client_print_color
(idGREEN,  "%L"id"YOUR_RANK_IS"iRankPosiRankMaxizStats[STATS_KILLS], izStats[STATS_HITS], fEfffAcc


zippel 04-29-2011 06:39

Re: [Need Help] with statxs' colorfix.
 
Quote:

Quote:

Originally Posted by .Dare Devil. (Post 1459963)
http://forums.alliedmods.net/showthr...ight=colorchat

PHP Code:

 
  client_print_color
(idGREEN,  "%L"id"YOUR_RANK_IS"iRankPosiRankMaxizStats[STATS_KILLS], izStats[STATS_HITS], fEfffAcc


Quote:

Originally Posted by Arkshine (Post 1459960)


I've explored these topics, but didn't come to the final version. And tried many different ways, using both headers - no avail.

zippel 04-29-2011 06:44

Re: [Need Help] with statxs' colorfix.
 
Quote:

Originally Posted by .Dare Devil. (Post 1459963)

Code:

client_print_color(id, GREEN,  "%L", id, "YOUR_RANK_IS", iRankPos, iRankMax, izStats[STATS_KILLS], izStats[STATS_HITS], fEff, fAcc)

I can make a line in one color.
However, I would like to learn how to make them loose.


All times are GMT -4. The time now is 04:22.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.