A small reqest
#1

I wanted to ask if somone could make a simple /stats cmd for me with these sections shown:
Score,
Cash,
Kills,
TerroristLVL,
RapeistLVL,
SwatMemmber(Yes/No),
ArmyMemmber(Yes/No),
RegularPlayer(Yes/No),
AdminLVL,
Playtime(Hours).

Rep from me to one who does it
Reply
#2

Resources, it can replicate them;

pawn Код:
CMD:stats(playerid)
{
    new statz[1024];
    strcat(statz, "Score: %d\n",GetPlayerScore(playerid));
    strcat(statz, "Money: $%d\n",GetPlayerMoney(playerid));
    ShowPlayerDialog(playerid,644,DIALOG_STYLE_MSGBOX,"Stats",statz,"Close","");
    return true;
}
Reply
#3

Quote:
Originally Posted by Hwang
Посмотреть сообщение
Resources, it can replicate them;

pawn Код:
CMD:stats(playerid)
{
    new statz[1024];
    strcat(statz, "Score: %d\n",GetPlayerScore(playerid));
    strcat(statz, "Money: $%d\n",GetPlayerMoney(playerid));
    ShowPlayerDialog(playerid,644,DIALOG_STYLE_MSGBOX,"Stats",statz,"Close","");
    return true;
}
U mean that i can use the given tepmplate which u made like this? and just add them under the code of money ?
PHP код:
strcat(statz"Kills: %d\n",GetPlayerKills(playerid)); 
Reply
#4

Quote:
Originally Posted by weedxd
Посмотреть сообщение
U mean that i can use the given tepmplate which u made like this? and just add them under the code of money ?
PHP код:
strcat(statz"Kills: %d\n",GetPlayerKills(playerid)); 
It would not be out of the way, he getplayerkills not a function, but you can do as follows:

pawn Код:
new KILLZ[MAX_PLAYERS];
OnPlayerDeath:
pawn Код:
KILLZ[killerid] += 1;
Strcat:
pawn Код:
strcat(statz, "Kills: %d\n",KILLZ[playerid]);
Reply
#5

Quote:
Originally Posted by Hwang
Посмотреть сообщение
It would not be out of the way, he getplayerkills not a function, but you can do as follows:

pawn Код:
new KILLZ[MAX_PLAYERS];
OnPlayerDeath:
pawn Код:
KILLZ[killerid] += 1;
Strcat:
pawn Код:
strcat(statz, "Kills: %d\n",KILLZ[playerid]);
Btw gamemode is dcmd i think it would have probs with this
Reply
#6

Quote:
Originally Posted by weedxd
Посмотреть сообщение
Btw gamemode is dcmd i think it would have probs with this
pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
OnPlayerCommandText:
pawn Код:
dcmd(stats,5,cmdtext);
pawn Код:
dcmd_stats(playerid, params[])
{
#pragma unused params
//Codes Here
return true;
}
Reply
#7

pawn Код:
dcmd_stats(playerid, params[])
{
    #pragma unused params
    new statz[1024];
    strcat(statz, "Score: %d\n",GetPlayerScore(playerid));
    strcat(statz, "Money: $%d\n",GetPlayerMoney(playerid));
    strcat(statz, "Kills: %d\n",KILLZ[playerid]);
    ShowPlayerDialog(playerid,644,DIALOG_STYLE_MSGBOX,"Stats",statz,"Close","");
    return true;
}
Reply
#8

Quote:
Originally Posted by Hwang
Посмотреть сообщение
pawn Код:
dcmd_stats(playerid, params[])
{
    #pragma unused params
    new statz[1024];
    strcat(statz, "Score: %d\n",GetPlayerScore(playerid));
    strcat(statz, "Money: $%d\n",GetPlayerMoney(playerid));
    strcat(statz, "Kills: %d\n",KILLZ[playerid]);
    ShowPlayerDialog(playerid,644,DIALOG_STYLE_MSGBOX,"Stats",statz,"Close","");
    return true;
}
Score
Cash
Kills
TerroristLVL
RapeistLVL
SwatMemmber(Yes/No)
ArmyMemmber(Yes/No)
RegularPlayer(Yes/No)
AdminLVL
Playtime(Hours)

With these
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)