Help in stats command.
#4

this is for mystats , show your stats;
pawn Код:
CMD:mystats(playerid, params[])
{
    new string[256], sendername[MAX_PLAYER_NAME];
    new
        admin,
        kills,
        deaths;
       
    admin = PlayerInfo[playerid][pAdmin]; // i dont know your variables , change this to your variables
    kills = PlayerInfo[playerid][pKills];
    deaths = PlayerInfo[playerid][pDeaths];
    format(string,sizeof(string), "PlayerName:( %s ) Admin Level:[ %d ] Kills:[ %d ] Deaths:[ %d ]",sendername,admin,kills,deaths);
    ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX , "MyStats", string, "Okay", "");
    return 1;
}
this is for checking other player stats;
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>

#define DIALOG_STATS 1997

#define red 0xFF0000AA

CMD:stats(playerid, params[])
{
    new str[256];
    new pid;
    new
        admin = PlayerInfo[playerid][pAdmin],
        kills = PlayerInfo[playerid][pKills],
        deaths = PlayerInfo[playerid][pDeaths];
    if(sscanf(params,"u",pid)) return SendClientMessage(playerid,red,"[USAGE]:/stats [PlayerID/PartOfName]");
    format(str, sizeof(str), "AdminLevel:[ %d ] Kills:[ %d ] Deaths:[ %d ]", admin,kills,deaths);
    ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX , "PlayerStats", string, "Close", "");
    return 1;
}
Reply


Messages In This Thread
Help in stats command. - by Champ - 27.07.2012, 04:55
Re: Help in stats command. - by vexer1234 - 27.07.2012, 05:02
Re: Help in stats command. - by Devilxz97 - 27.07.2012, 05:54
Re: Help in stats command. - by Devilxz97 - 27.07.2012, 07:00
Re: Help in stats command. - by DiegoRider - 12.07.2013, 15:59

Forum Jump:


Users browsing this thread: 1 Guest(s)