SA-MP Forums Archive
[ZCMD] Need help Realy Fast! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [ZCMD] Need help Realy Fast! (/showthread.php?tid=483884)



[ZCMD] Need help Realy Fast! - donhu789 - 28.12.2013

pawn Код:
CMD:stats(playerid,params[])
{
    new pDeaths, player1, h, m, s,playername[MAX_PLAYER_NAME];
    if(isnull(params)) player1 = playerid;
    else player1 = strval(params);

    if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
        TotalGameTime(player1, h, m, s);
        GetPlayerName(player1, playername, sizeof(playername));
        if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
        new str[20][1000];
        format(str[0],1000,"\t\t\t{F2C80C}YG Stats For %s's\n", PlayerName2(player1));
        strcat(str[1],str[0]);
        format(str[2],1000,"{FFFFFF}Scores:{00FFFF} %d{FFFFFF}, Money:{00FFFF} $%d{FFFFFF}, Kills:{00FFFF} %d{FFFFFF}, Deaths:{00FFFF} %d{FFFFFF}, K/D Ratio:{00FFFF} %0.2f{FFFFFF},\n", GetPlayerScore(player1), GetPlayerMoney(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths);
        strcat(str[1],str[2]);
        format(str[3],1000,"{FFFFFF}Admin Level:{00FFFF} %d{FFFFFF}, Skin:{00FFFF} %d{FFFFFF}, Ping:{00FFFF} %d, Bank:{00FFFF} $%d{FFFFFF} ~ Wanted Level:{00FFFF} %d{FFFFFF},\n", PlayerInfo[player1][Level],GetPlayerSkin(player1),GetPlayerPing(player1),PlayerInfo[player1][bank],GetPlayerWantedLevel(player1));
        strcat(str[1],str[3]);
        format(str[4],1000,"{FFFFFF}Playing Since: {00FFFF}%d {FFFFFF}Hours, {00FFFF}%d {FFFFFF}Mins, {00FFFF}%d{FFFFFF} Secs:, Interior: {00FFFF}%d{FFFFFF}, Country: {00FFFF}%s{FFFFFF},\n", h, m, s, GetPlayerInterior(player1),GetPlayerCountryName(player1));
        strcat(str[1],str[4]);
        format(str[5],1000,"{FFFFFF}Cookies: {00FFFF}%d{FFFFFF}, Cakes: {00FFFF}%d{FFFFFF}, AdminKills: {00FFFF}%d{FFFFFF}, VIP Level : %d\n", PlayerInfo[player1][Cookies], PlayerInfo[player1][Cakes], PlayerInfo[player1][AdminKills], PlayerInfo[player1][dRank]);
        strcat(str[1],str[5]);
        format(str[6],1000,"{FFFFFF}TP Status: {00FFFF}%s.\n",PlayerInfo[player1][Trusted] ? ("Yes") : ("No"), PlayerInfo[player1][Phours], PlayerInfo[player1][Pmins], PlayerInfo[player1][Psecs]);
        strcat(str[1],str[6]);
        ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"Player Stats",str[1],"OK","");
    } else return SendClientMessage(playerid, red, "Player Not Connected!");
    return 1;
}

how can i make this if i use /stats is will show my status

and if i use /stats 1 is will show the ID 1 id

please help


Re: [ZCMD] Need help Realy Fast! - Antoniohl - 28.12.2013

Try use /check to check player stat's?*


Re: [ZCMD] Need help Realy Fast! - donhu789 - 28.12.2013

no i don't meen that

i wanted it /stat = my stats

/stats 1 2 3 4 5 6 7 8 9

show /stats 1 2 3 4 5 67 8 9 person stats