06.12.2014, 14:58
Hey,
I'm currently making a system where Admins can view other players stats by clicking on their name (On the TAB list). But when I click on someones name ingame it will only show the last line.
So, ingame it only shows the players online time. How can I fix this and show the whole dialog?
Thanks
I'm currently making a system where Admins can view other players stats by clicking on their name (On the TAB list). But when I click on someones name ingame it will only show the last line.
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
if( pInfo[playerid][pAdmin] >= 1)
{
new
clickedname[MAX_PLAYER_NAME];
GetPlayerName(clickedplayerid, clickedname, sizeof(clickedname));
new IP[16];
GetPlayerIp(clickedplayerid, IP, sizeof(IP));
new pDialog[1500];
format(pDialog, sizeof(pDialog), "{FFE226}Name - {FFFFFF}%s[%d]\n\n", clickedname, clickedplayerid );
format(pDialog, sizeof(pDialog), "{FFE226}IP - {FFFFFF}%s\n", IP);
format(pDialog, sizeof(pDialog), "{FFE226}Score - {FFFFFF}%d\n", GetPlayerScore(clickedplayerid) );
format(pDialog, sizeof(pDialog), "{FFE226}Money - {FFFFFF}%d\n", GetPlayerMoney(clickedplayerid) );
format(pDialog, sizeof(pDialog), "{FFE226}Kills - {FFFFFF}%d\n", pInfo[clickedplayerid][pKills]);
format(pDialog, sizeof(pDialog), "{FFE226}Deaths - {FFFFFF}%d\n", pInfo[clickedplayerid][pDeaths]);
format(pDialog, sizeof(pDialog), "{FFE226}Warnings - {FFFFFF}%d\n", pInfo[clickedplayerid][pWarns]);
format(pDialog, sizeof(pDialog), "{FFE226}Warnings - {FFFFFF}%d\n\n", pInfo[clickedplayerid][pWarns]);
format(pDialog, sizeof(pDialog), "{FFE226}Extras:\n");
format(pDialog, sizeof(pDialog), "{FFE226}Admin Level - {FFFFFF}%d\n", pInfo[clickedplayerid][pAdmin]);
format(pDialog, sizeof(pDialog), "{FFE226}VIP Level - {FFFFFF}%d\n", pInfo[clickedplayerid][pVip]);
format(pDialog, sizeof(pDialog), "{FFE226}Swat Level - {FFFFFF}%d\n", pInfo[clickedplayerid][pSwat]);
format(pDialog, sizeof(pDialog), "{FFE226}Army Level - {FFFFFF}%d\n", pInfo[clickedplayerid][pArmy]);
format(pDialog, sizeof(pDialog), "{FFE226}Online Time - {FFFFFF}Hours: %d | Minutes: %d | Seconds: %d \n", pInfo[clickedplayerid][pHours], pInfo[clickedplayerid][pMinutes], pInfo[clickedplayerid][pSeconds]);
ShowPlayerDialog(playerid, 8277272, DIALOG_STYLE_MSGBOX, "{FFE226}Players Stats", pDialog, "OK", "");
}
return 1;
}
Thanks