Command dialog (rep+)
#1

Can you make me this command to show player stats in dialog
PHP код:
if (strcmp(cmd"/stats"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
             if (
gPlayerLogged[playerid] != 0)
            {
                
ShowStats(playeridplayerid);
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   You are not Logged in !");
            }
        }
        return 
1;
    } 
PHP код:
public ShowStats(playerid,targetid)
{
    if(
IsPlayerConnected(playerid) && IsPlayerConnected(targetid))
    {
        new 
string[256];
        new 
drank[20];
        new 
Float:health;
        if(
PlayerInfo[targetid][pDonateRank] == 1) { drank "Нормален"; }
        else if(
PlayerInfo[targetid][pDonateRank] >= 2) { drank "Супер Вип"; }
        else { 
drank "Нямаш Вип"; }
        new 
admin PlayerInfo[targetid][pAdmin];
        new 
cash GetPlayerCash(targetid);
        new 
kills PlayerInfo[targetid][pKills];
        new 
deaths PlayerInfo[targetid][pDeaths];
        new 
intir GetPlayerInterior(targetid);
        new 
vw GetPlayerVirtualWorld(targetid);
        new 
warns PlayerInfo[targetid][pWarns];
        new 
hp GetPlayerHealth(targetidhealth);
        new 
armor GetPlayerArmour(targetidhealth);
        new 
jtime PlayerInfo[targetid][pJailTime];
        new 
spree PlayerInfo[targetid][pSpree];
        new 
bounty Bounty[targetid];
        new 
lotto PlayerInfo[targetid][pLotto];
        new 
faction TeamInfo[PlayerInfo[targetid][pMember]][TeamName];
        new 
prank PlayerInfo[targetid][pRank];
        new 
ranktext[256];
         switch(
prank)
           {
              case 
1format(ranktextsizeof(ranktext), "%s"TeamInfo[PlayerInfo[targetid][pMember]][fRank1]);
            case 
2format(ranktextsizeof(ranktext), "%s"TeamInfo[PlayerInfo[targetid][pMember]][fRank2]);
              case 
3format(ranktextsizeof(ranktext), "%s"TeamInfo[PlayerInfo[targetid][pMember]][fRank3]);
              case 
4format(ranktextsizeof(ranktext), "%s"TeamInfo[PlayerInfo[targetid][pMember]][fRank4]);
            case 
5format(ranktextsizeof(ranktext), "%s"TeamInfo[PlayerInfo[targetid][pMember]][fRank5]);
            case 
6format(ranktextsizeof(ranktext), "%s"TeamInfo[PlayerInfo[targetid][pMember]][fRank6]);
        }
        
SendClientMessage(playeridCOLOR_GREEN,"_______________________________________");
        
format(stringsizeof(string),"Статистика на %s:"PlayerName(targetid));
        
SendClientMessage(playeridCOLOR_GREENstring);
        
format(stringsizeof(string), "Админ Левел: %d Вип Ранк: %s"admindrank);
        
SendClientMessage(playeridCOLOR_GRAD2string);
        
format(stringsizeof(string), "Най-много Убийства без умиране: %d Убийства: %d Умирания: %d"spreekillsdeaths);
        
SendClientMessage(playeridCOLOR_GRAD2string);
        
format(stringsizeof(string), "Кръв: %d Армор: %d Пари: $%d"hparmorcash);
        
SendClientMessage(playeridCOLOR_GRAD2string);
        
format(stringsizeof(string), "Цена за главата му: %d Число от лотото: %d"bountylotto);
        
SendClientMessage(playeridCOLOR_GRAD2string);
        
format(stringsizeof(string), "Банда/Мафия: %s Ранк: %d(%s)"factionprankranktext);
        
SendClientMessage(playeridCOLOR_GRAD2string);
        if (
PlayerInfo[playerid][pAdmin] >= 1)
        {
            
format(stringsizeof(string), "Интериор:[%d] Виртуален свят:[%d] Предопреждения:[%d] Време в затвора:[%d]"vwintirwarnsjtime);
            
SendClientMessage(playeridCOLOR_WHITEstring);
        }
        
SendClientMessage(playeridCOLOR_GREEN,"_______________________________________");
    }

Reply


Messages In This Thread
Command dialog (rep+) - by boyan96 - 16.04.2012, 15:12
Re: Command dialog (rep+) - by Faisal_khan - 16.04.2012, 15:19
Re: Command dialog (rep+) - by Faisal_khan - 16.04.2012, 15:22
Re: Command dialog (rep+) - by boyan96 - 16.04.2012, 15:31
Re: Command dialog (rep+) - by boyan96 - 16.04.2012, 16:14

Forum Jump:


Users browsing this thread: 1 Guest(s)