Posts: 136
Threads: 18
Joined: Feb 2015
I forgot how to make the /stats command with this codes
Can you type me the code to make the /stats command with the kills/cash and this shits?
Here's the code of my pkills and this things
Quote:
enum pInfo
{
pPass,
pCash,
pAdmin,
pKills,
pDeaths
}
|
Posts: 270
Threads: 41
Joined: Jul 2014
Reputation:
0
I'm such an idiot, excuse me.
Posts: 160
Threads: 40
Joined: Jul 2015
Easy example
Код:
enum pInfo
{
pMoney
}
Код:
new PlayerInfo[MAX_PLAYERS][pInfo];
Код:
new str[100];
PlayerInfo[playerid][pMoney] = GetPlayerMoney(playerid);
format(str,sizeof(str),"Money: %d", PlayerInfo[playerid][pMoney]);
SendClientMessage(playerid, 0xFFFFFFFF,str);
Posts: 136
Threads: 18
Joined: Feb 2015
Quote:
Originally Posted by SpikeSpigel
Код:
enum pInfo
{
pPass,
pCash,
pAdmin,
pKills,
pDeaths
}
new PlayerInfo[MAX_PLAYERS][pInfo]; // In the upper part of the script.
CMD:stats(params, playerid) // In the lower part of the script.
{
new pName[MAX_PLAYER_NAME], string[126];
GetPlayerName(playerid, pName, sizeof(pName));
if(IsPlayerConnected)
{
format(string, sizeof(string), "________________%s's stats_______________", pName);
format(string, sizeof(string), "Money: %d , Kills: %d , Deaths: %d", PlayerInfo[playerid][pCash], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]);
format(string, sizeof(string), "________________________________________");
SendClientMessage(playerid, -1, string);
}
else
{
SendClientMessage(playerid, -1, "You are not connected.");
}
return 1;
}
|
Didn't work