03.08.2010, 13:44
pawn Код:
dcmd_getstats(playerid, params[])
{
new ReturnPlayer, ReturnUserName[24], ReturnPlayerFile[50], str[256], pDeaths[50], pKills[50], pDuelDeaths[50], pDuelKills[50], pMadnesswin[50];
if(sscanf(params, "d", ReturnPlayer)) return SendClientMessage(playerid, mwhite, "Usage: /getstats [playerid]");
if(ReturnPlayer == playerid) return SendClientMessage(playerid, mbrightred, "Use /my stats to see your own stats.");
GetPlayerName(ReturnPlayer, ReturnUserName, sizeof(ReturnUserName));
format(ReturnPlayerFile, sizeof(ReturnPlayerFile), "/users/%s.ini", ReturnUserName);
if(!IsPlayerConnected(ReturnPlayer)) return SendClientMessage(playerid, mbrightred, "Invalid player ID.");
if(!dini_Exists(ReturnPlayerFile)) return SendClientMessage(playerid, mbrightred, "This player is an unregistered player.");
if(dini_Exists(ReturnPlayerFile))
{
.
.
.
}
return 1;
}