20.05.2017, 11:37
Код:
CMD:stats(playerid, params[]) { new str[900], str2[70], giveid, AdminRank[30], weaponset[30]; if (sscanf(params, "u", giveid)) return SendClientMessage(playerid, 0x6FFF00FF, "{F07F1D}USAGE: {BBFF00}/stats "); if (giveid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, ""RED"ERROR: "GREY"Invalid player ID!"); switch (PlayerInfo[giveid][Admin]) { case 0: AdminRank = "Regular Player"; case 1: AdminRank = "{15C257}Moderator"; case 2: AdminRank = "{EDD628}Administrator"; case 3: AdminRank = "{3D77F5}Head Administrator"; case 4: AdminRank = "{F55F3D}Server Owner"; } switch (PlayerInfo[giveid][WeaponSet]) { case 0: weaponset = "Standard"; case 1: weaponset = "Advanced"; case 2: weaponset = "Expert"; case 3: weaponset = "Custom"; } new str3[40]; strcat(str3, ""ORANGE"IP Address: \t\t"WHITE"["STEELBLUE"%s"WHITE"]\n"); strcat(str, ""ORANGE"Account ID: \t\t"WHITE"["STEELBLUE"%i"WHITE"]\n"); strcat(str, ""ORANGE"Score: \t\t"WHITE"["STEELBLUE"%i"WHITE"]\n"); strcat(str, ""ORANGE"Money: \t\t"WHITE"["STEELBLUE"$%i"WHITE"]\n"); strcat(str, ""ORANGE"Bank Cash: \t\t"WHITE"["STEELBLUE"$%i"WHITE"]\n"); strcat(str, ""ORANGE"Admin Level: \t\t"WHITE"["STEELBLUE"%i"WHITE"] - "WHITE"[%s"WHITE"]\n"); strcat(str, ""ORANGE"V.I.P. Level: \t\t"WHITE"["STEELBLUE"%i"WHITE"]\n"); strcat(str, ""ORANGE"Member since: \t\t"WHITE"["STEELBLUE"%s"WHITE"]\n"); strcat(str, ""ORANGE"Weaponset: \t\t"WHITE"["STEELBLUE"%s"WHITE"]\n"); strcat(str, ""ORANGE"Skin ID: \t\t"WHITE"["STEELBLUE"%i"WHITE"]\n"); strcat(str, ""ORANGE"Kills: \t"WHITE"["STEELBLUE"%i"WHITE"]\n"); strcat(str, ""ORANGE"Deaths: \t"WHITE"["STEELBLUE"%i"WHITE"]\n"); strcat(str, ""ORANGE"Money bags found: \t\t"WHITE"["STEELBLUE"%i"WHITE"]\n"); strcat(str, ""ORANGE"Reaction test won:\t\t"WHITE"["STEELBLUE"%i"WHITE"]\n"); strcat(str, ""ORANGE"LMS events won: \t\t"WHITE"["STEELBLUE"%i"WHITE"]\n"); strcat(str, ""ORANGE"Fallouts Won: \t\t"WHITE"["STEELBLUE"%d"WHITE"]\n"); if(PlayerInfo[playerid][Admin] == 0) { format(str, sizeof(str), str, PlayerInfo[giveid][AccID], GetPlayerScore(giveid), GetPlayerMoney(giveid), PlayerInfo[giveid][Admin], AdminRank, PlayerInfo[giveid][VIP], PlayerInfo[giveid][RegOn], weaponset, GetPlayerSkin(giveid), PlayerInfo[giveid][Kills], PlayerInfo[giveid][Deaths], PlayerInfo[giveid][MBsFound], PlayerInfo[giveid][ReactionsWon], LMSWins(giveid), PlayerInfo[giveid][FalloutsWon], FalloutsWon[giveid]); } else if(PlayerInfo[playerid][Admin] >= 1) { format(str, sizeof(str), str, PlayerInfo[giveid][AccID], GetPlayerScore(giveid), GetPlayerMoney(giveid), Bank_Balance[playerid], PlayerInfo[giveid][Admin], AdminRank, PlayerInfo[giveid][VIP], PlayerInfo[giveid][RegOn], weaponset, GetPlayerSkin(giveid), PlayerInfo[giveid][Kills], PlayerInfo[giveid][Deaths], PlayerInfo[giveid][MBsFound], PlayerInfo[giveid][ReactionsWon], LMSWins[giveid], PlayerInfo[giveid][FalloutsWon], FalloutsWon(giveid), str3, GetIP(giveid)); } format(str2, sizeof(str2), " {%06x}%s(%i)'s account statistics", (GetPlayerColor(giveid) >>> 8), GetName(giveid), giveid); ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, str2, str, "OK", ""); return 1; }