Help in stats command.
#1

Hello All. I have a stats system but i does not shows other stats. i want to make it that the command show other stats like. /stats [id] and /stats for himself. need help quickly.

thank you
Reply
#2

Well, If you can elaborate, I can help you. Or just add me on skype: rohan.rulzz

I'll help you.
Reply
#3

give me all your variables
example

pawn Код:
enum pInfo
{
     blabla,
     lololol
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Reply
#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
#5

update stats in game ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)