14.08.2013, 09:08
The is your problems solved
Stats
Rules
Stats
pawn Код:
CMD:stats(playerid)
{
new string[428], sLine[34], pDeaths, h, m, s;
TotalGameTime(playerid, h, m, s);
if (PlayerInfo[playerid][Deaths] == 0) pDeaths = 1;
else pDeaths = PlayerInfo[playerid][Deaths];
format(sLine, sizeof(sLine), "{fff000}+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+");
format(string, sizeof(string), "%s {FC0303}%s's Stats %s \n*Player Kills: %d \n*Player Deaths: %d \n*Player Ratio: %0.2f \n*Player Money: $%d \nSkin: %d \nScore: %d \nAdmin Level: %d \nPing: %d \nBank: $%d \nWanted Level: %d \nInterior: %d \nCountry: %s",
sLine,
PlayerName2(playerid),
sLine,
PlayerInfo[playerid][Kills],
PlayerInfo[playerid][Deaths],
Float:PlayerInfo[playerid][Kills]/Float:pDeaths,
GetPlayerMoney(playerid),
GetPlayerSkin(playerid),
GetPlayerScore(playerid),
PlayerInfo[playerid][Level],
GetPlayerPing(playerid),
PlayerInfo[playerid][bank],
GetPlayerWantedLevel(playerid),
GetPlayerInterior(playerid),
GetPlayerCountryName(playerid)
);
return ShowPlayerDialog(playerid, 758, 0, "[YS]Your Stats", string, "Ok", "");
}
pawn Код:
CMD:rules(playerid)
{
new PT[1000];
strcat(PT, "{FFFFFF}>: Rule 1 \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule 2 \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule 3 \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule 4 \n", sizeof(PT));
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, "{46BEE6}YS Server Rules:", PT, "I Agree", "I Disagree");
return 1;
}