ShowPlayerDialog help
#3

Try this
Код:
CMD:stats(playerid,params[]) 
{ 
new id; 
new PlayerName[MAX_PLAYER_NAME]; 
GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); 
new string[50]; 
sscanf(params, "u", id); 
if (isnull(params)) 
{ 
format(string, sizeof(string), "_Statistics for '%s'_", PlayerName); 
SendClientMessage(playerid, LIME, string); 
format(string, sizeof(string), "General Stats\n"); 
format(string, sizeof(string), "Money: %d\n", GetPlayerCash(playerid)); 
format(string, sizeof(string), "Score: $%d\n", GetPlayerScore(playerid)); 
format(string, sizeof(string), "Total Kills: %d\n", pInfo[playerid][pKills]); 
format(string, sizeof(string), "Total Deaths: %d\n", pInfo[playerid][pDeaths]); 
format(string, sizeof(string), "Moneybags Found: %0.2f\n", pInfo[playerid][pMoneyBags]); 
format(string, sizeof(string), "Total Times Farted: %s\n", pInfo[playerid][pFarts]); 
format(string, sizeof(string), "Spontaneous Combustions: %s\n", pInfo[playerid][pFartExp]); 
format(string, sizeof(string), "Total Panadol Used: %s\n", pInfo[playerid][pPanadolUsed]); 
format(string, sizeof(string), "Criminal Stats\n"); 
format(string, sizeof(string), "Total Players Robbed: %d\n", pInfo[playerid][pPlayerRobs]); 
format(string, sizeof(string), "Total Times Robbed: %d\n", pInfo[playerid][pRobbedBy]); 
format(string, sizeof(string), "Total 24/7s Robbed: %d\n", pInfo[playerid][p247Robs]); 
format(string, sizeof(string), "Total Ammunations Robbed: %d\n", pInfo[playerid][pAmmuRobs]); 
format(string, sizeof(string), "Total Banks Robbed: %d\n", pInfo[playerid][pBankRobs]); 
format(string, sizeof(string), "Total Heists Done: %d\n", pInfo[playerid][pBankHeists]); 
format(string, sizeof(string), "Total Times Jailed: %d\n", pInfo[playerid][pJails]); 
format(string, sizeof(string), "Total Stars Attained: %d\n", pInfo[playerid][pStarsAtt]); 
format(string, sizeof(string), "Total Drugs Purchased: %d\n", pInfo[playerid][pDrugsPurch]); 
format(string, sizeof(string), "Total Drugs Sold: N/A\n"); 
format(string, sizeof(string), "Total Drugs Used: %d\n", pInfo[playerid][pDrugsUsed]); 
format(string, sizeof(string), "[Police Stats]\n"); 
format(string, sizeof(string), "Total Arrests: %d\n", pInfo[playerid][pArrests]); 
ShowPlayerDialog(playerid, STATS_DIALOG, DIALOG_STYLE_MSGBOX, "{FF6666}Player Stats for %s", PlayerName, "Okay",""); 
} 
else if(IsPlayerConnected(id)) 
{ 
format(string, sizeof(string), "_Statistics for '%s'_", PlayerName); 
SendClientMessage(playerid, LIME, string); 
format(string, sizeof(string), "General Stats\n"); 
format(string, sizeof(string), "Money: %d\n", GetPlayerCash(playerid)); 
format(string, sizeof(string), "Score: $%d\n", GetPlayerScore(playerid)); 
format(string, sizeof(string), "Total Kills: %d\n", pInfo[playerid][pKills]); 
format(string, sizeof(string), "Total Deaths: %d\n", pInfo[playerid][pDeaths]); 
format(string, sizeof(string), "Moneybags Found: %0.2f\n", pInfo[playerid][pMoneyBags]); 
format(string, sizeof(string), "Total Times Farted: %s\n", pInfo[playerid][pFarts]); 
format(string, sizeof(string), "Spontaneous Combustions: %s\n", pInfo[playerid][pFartExp]); 
format(string, sizeof(string), "Total Panadol Used: %s\n", pInfo[playerid][pPanadolUsed]); 
format(string, sizeof(string), "Criminal Stats\n"); 
format(string, sizeof(string), "Total Players Robbed: %d\n", pInfo[playerid][pPlayerRobs]); 
format(string, sizeof(string), "Total Times Robbed: %d\n", pInfo[playerid][pRobbedBy]); 
format(string, sizeof(string), "Total 24/7s Robbed: %d\n", pInfo[playerid][p247Robs]); 
format(string, sizeof(string), "Total Ammunations Robbed: %d\n", pInfo[playerid][pAmmuRobs]); 
format(string, sizeof(string), "Total Banks Robbed: %d\n", pInfo[playerid][pBankRobs]); 
format(string, sizeof(string), "Total Heists Done: %d\n", pInfo[playerid][pBankHeists]); 
format(string, sizeof(string), "Total Times Jailed: %d\n", pInfo[playerid][pJails]); 
format(string, sizeof(string), "Total Stars Attained: %d\n", pInfo[playerid][pStarsAtt]); 
format(string, sizeof(string), "Total Drugs Purchased: %d\n", pInfo[playerid][pDrugsPurch]); 
format(string, sizeof(string), "Total Drugs Sold: N/A\n"); 
format(string, sizeof(string), "Total Drugs Used: %d\n", pInfo[playerid][pDrugsUsed]); 
format(string, sizeof(string), "[Police Stats]\n"); 
format(string, sizeof(string), "Total Arrests: %d\n", pInfo[playerid][pArrests]); 
ShowPlayerDialog(playerid, STATS_DIALOG, DIALOG_STYLE_MSGBOX, "{FF6666}Player Stats for %s", PlayerName, "Okay",""); 
}
else
{
SendClientMessage(playerid,RED,"[ERROR]: Player is not connected"); 
}
return 1; 
}
Reply


Messages In This Thread
ShowPlayerDialog help - by tommzy09 - 26.05.2015, 01:06
Re: ShowPlayerDialog help - by LMaxCo - 26.05.2015, 01:41
Re: ShowPlayerDialog help - by LMaxCo - 26.05.2015, 01:45
Re: ShowPlayerDialog help - by tommzy09 - 26.05.2015, 02:09
Re: ShowPlayerDialog help - by Trucido - 26.05.2015, 02:14
Re: ShowPlayerDialog help - by LMaxCo - 26.05.2015, 02:16
Re: ShowPlayerDialog help - by tommzy09 - 26.05.2015, 02:17
Re: ShowPlayerDialog help - by Trucido - 26.05.2015, 02:33
Re: ShowPlayerDialog help - by tommzy09 - 26.05.2015, 02:41

Forum Jump:


Users browsing this thread: 2 Guest(s)