18.02.2018, 16:52
PHP код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
showstats(clickedplayerid);
return 1;
}
PHP код:
stock showstats(clickedplayerid)
{
new iString[2000];
format (iString, sizeof(iString), "{CECEF6}(INFO) You are viewing %s's stats", PlayerName[clickedplayerid]);
SendClientMessage(clickedplayerid, -1, iString);
format(iString,sizeof(iString),"{FCAE9D}Score: {FFFFFF}%i {FCAE9D}| Level: {FFFFFF}%i {FCAE9D}| Duels Won: {FFFFFF}%i {FCAE9D}| Duels Lost: {FFFFFF}%i", pInfo[clickedplayerid][Score], pInfo[clickedplayerid][Level], pInfo[clickedplayerid][DuelsWin], pInfo[clickedplayerid][DuelsLost]);
SendClientMessage(clickedplayerid, -1, iString);
format(iString,sizeof(iString),"{FCAE9D}Total Points: {FFFFFF}%i {FCAE9D}| Total Respect: {FFFFFF}%i {FCAE9D}| Total Kills: {FFFFFF}%i {FCAE9D}| Total Deaths: {FFFFFF}%i", pInfo[clickedplayerid][Points], pInfo[clickedplayerid][Respect], pInfo[clickedplayerid][Kills],pInfo[clickedplayerid][Deaths]);
SendClientMessage(clickedplayerid, -1, iString);
format(iString,sizeof(iString),"{FCAE9D}Current Kills: {FFFFFF}%i {FCAE9D}| Current Deaths: {FFFFFF}%i {FCAE9D}| Ratio: {FFFFFF}%.2f", PlayerKills[clickedplayerid], PlayerDeaths[clickedplayerid], floatdiv(PlayerKills[clickedplayerid], PlayerDeaths[clickedplayerid]));
SendClientMessage(clickedplayerid, -1, iString);
format(iString,sizeof(iString),"{FCAE9D}Headshots: {FFFFFF}%i", pInfo[clickedplayerid][Headshots]);
SendClientMessage(clickedplayerid, -1, iString);
return 1;
}