22.08.2016, 10:01
Code:
CMD:ostats(playerid,params[]) { if(PlayerInfo[playerid][pLevel] >= 3) { new namezz[32]; if(sscanf(params, "s", namezz)) return SendClientMessage(playerid, red, "USAGE: /ostats [playername]"); new playerFile[100]; format(playerFile,256,"/ladmin/users/%s.ini",udb_encode(namezz)); if(fexist(playerFile)) { new string[500]; new house[50]; new houseID = dini_Int(playerFile, "Houseid"); new houseIDStr[6]; switch(houseID) { case -255: { houseIDStr = "N/A"; } case 255: { format(houseIDStr, 6 ,"%d", houseID); } } new bizID = dini_Int(playerFile, "bowned"); new bizIDStr[6]; switch(bizID) { case 0, -255: { bizIDStr = "N/A"; } case 255: { format(bizIDStr, 6,"%d", bizID); } } format(house,50,"SATDM/Houses/house%d",dini_Int(playerFile, "Houseid")); format(string,sizeof(string)," {FFFF00}|- Account Details -|\n\n{FFFFFF}Name: {33FF33}%s\n{FFFFFF}Last Ip: {33FF33}%s\n{FFFFFF}Registration date: {33FF33}%s\n{FFFFFF}Last time online: {33FF33}%s\n\n {FFFF00}|- User Statistics -|\n\n{FFFFFF}Kills: {33FF33}%d || {FFFFFF}Deaths: {33FF33}%d\n{FFFFFF}Admin level: {33FF33}%d ||{FFFFFF}Vip level: {33FF33}%d\n{FFFFFF}Money: {33FF33}%d || {FFFFFF}Bank: {33FF33}%d || {FFFFFF}Weed: {33FF33}%d\n\n {FFFF00}|- House & Business -|\n\n{FFFFFF}House ID: {33FF33}%d\n{FFFFFF}Business ID: {33FF33}%d\n\n {FFFF00}|- Vehicles -|\n\n{FFFFFF}Slot 1: {33FF33}%s\n{FFFFFF}Slot 2: {33FF33}%s\n{FFFFFF}Slot 3: {33FF33}%s\n{FFFFFF}Slot 4: {33FF33}%s\n{FFFFFF}Slot 5: {33FF33}%s\n{FFFFFF}Slot 6: {33FF33}%s\n{FFFFFF}Slot 7: {33FF33}%s\n{FFFFFF}Slot 8: {33FF33}%s", namezz,dini_Get(playerFile, "Ip"),dini_Get(playerFile, "Registereddate"), dini_Get(playerFile, "Laston"),dini_Int(playerFile, "kills"), dini_Int(playerFile, "deaths"), dini_Int(playerFile, "level"),dini_Int(playerFile,"vip"), dini_Int(playerFile, "money"), dini_Int(playerFile, "bank"), dini_Int(playerFile, "weed"), dini_Int(playerFile, "vowned"),dini_Int(playerFile, "vowned2"),dini_Int(playerFile, "vowned3"),dini_Int(playerFile, "vowned4"),dini_Int(playerFile, "vowned5"),dini_Int(playerFile, "vowned6"),dini_Int(playerFile, "vowned7"),dini_Int(playerFile, "vowned8"); ShowPlayerDialog(playerid,197,DIALOG_STYLE_MSGBOX, "{FFFF00}Offline Stats", string, "Ok", ""); } else return SendClientMessage(playerid, red, "That player doesn't exist!"); } else return SendClientMessage(playerid, red, "ERROR: You are not a high enough level to use this command"); return 1; }