updated playerlist, changed bp.tf a little
This commit is contained in:
parent
0b073303d3
commit
7ca6e9d7c8
@ -93,6 +93,7 @@ void processing_thread() {
|
|||||||
logging::Info("Parsing data for user %u (%s)", userid, name.c_str());
|
logging::Info("Parsing data for user %u (%s)", userid, name.c_str());
|
||||||
if (v.find("inventory") == v.end()) {
|
if (v.find("inventory") == v.end()) {
|
||||||
store_data(userid, 0, true, false);
|
store_data(userid, 0, true, false);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
const auto& inv = v.at("inventory").at("440");
|
const auto& inv = v.at("inventory").at("440");
|
||||||
if (inv.find("value") == inv.end()) {
|
if (inv.find("value") == inv.end()) {
|
||||||
|
@ -18,14 +18,15 @@ void RenderPlayer(int eid) {
|
|||||||
player_info_s info;
|
player_info_s info;
|
||||||
bool success = g_IEngine->GetPlayerInfo(eid, &info);
|
bool success = g_IEngine->GetPlayerInfo(eid, &info);
|
||||||
if (success) {
|
if (success) {
|
||||||
//ImGui::PushItemWidth(50);
|
int x = 0;
|
||||||
ImGui::Text("%d", info.userID);
|
// UserID
|
||||||
//ImGui::PopItemWidth();
|
ImGui::Text("%d", info.userID);
|
||||||
ImGui::SameLine(48);
|
x += 48;
|
||||||
//ImGui::PushItemWidth(100);
|
ImGui::SameLine(x);
|
||||||
ImGui::Text("%u", info.friendsID);
|
// SteamID
|
||||||
//ImGui::PopItemWidth();
|
ImGui::Text("%u", info.friendsID);
|
||||||
ImGui::SameLine(140);
|
x += 80;
|
||||||
|
ImGui::SameLine(x);
|
||||||
|
|
||||||
char safename[32];
|
char safename[32];
|
||||||
for (int i = 0, j = 0; i < 32; i++) {
|
for (int i = 0, j = 0; i < 32; i++) {
|
||||||
@ -36,10 +37,10 @@ void RenderPlayer(int eid) {
|
|||||||
if (info.name[i] == '\n') continue;
|
if (info.name[i] == '\n') continue;
|
||||||
safename[j++] = info.name[i];
|
safename[j++] = info.name[i];
|
||||||
}
|
}
|
||||||
//ImGui::PushItemWidth(250);
|
|
||||||
ImGui::Text("%s", safename);
|
ImGui::Text("%s", safename);
|
||||||
//ImGui::PopItemWidth();
|
x += 8 * 32;
|
||||||
ImGui::SameLine(320);
|
ImGui::SameLine(x);
|
||||||
|
|
||||||
int iclazz = 0;
|
int iclazz = 0;
|
||||||
rgba_t bgcolor = colors::empty;
|
rgba_t bgcolor = colors::empty;
|
||||||
@ -63,14 +64,14 @@ void RenderPlayer(int eid) {
|
|||||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(bgcolor.r, bgcolor.g, bgcolor.b, bgcolor.a));
|
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(bgcolor.r, bgcolor.g, bgcolor.b, bgcolor.a));
|
||||||
}
|
}
|
||||||
|
|
||||||
//ImGui::PushItemWidth(150);
|
ImGui::Text("%s", text);
|
||||||
ImGui::Text("%s", text);
|
x += 80;
|
||||||
//ImGui::PopItemWidth();
|
ImGui::SameLine(x);
|
||||||
ImGui::SameLine(420);
|
|
||||||
|
|
||||||
if (bgcolor.a) {
|
if (bgcolor.a) {
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
playerlist::userdata& data = playerlist::AccessData(info.friendsID);
|
playerlist::userdata& data = playerlist::AccessData(info.friendsID);
|
||||||
int& state = *reinterpret_cast<int*>(&data.state);
|
int& state = *reinterpret_cast<int*>(&data.state);
|
||||||
bgcolor = playerlist::Color(info.friendsID);
|
bgcolor = playerlist::Color(info.friendsID);
|
||||||
@ -80,11 +81,15 @@ void RenderPlayer(int eid) {
|
|||||||
ImGui::PushItemWidth(120);
|
ImGui::PushItemWidth(120);
|
||||||
ImGui::Combo("", &state, playerlist::k_pszNames, 5);
|
ImGui::Combo("", &state, playerlist::k_pszNames, 5);
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
|
|
||||||
|
x += 124;
|
||||||
|
|
||||||
if (bgcolor.a) {
|
if (bgcolor.a) {
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (backpacktf::enabled()) {
|
if (backpacktf::enabled()) {
|
||||||
ImGui::SameLine();
|
ImGui::SameLine(x);
|
||||||
if (info.fakeplayer) {
|
if (info.fakeplayer) {
|
||||||
ImGui::Text("[BOT]");
|
ImGui::Text("[BOT]");
|
||||||
} else if (!info.friendsID) {
|
} else if (!info.friendsID) {
|
||||||
@ -96,7 +101,7 @@ void RenderPlayer(int eid) {
|
|||||||
ImGui::Text("Error");
|
ImGui::Text("Error");
|
||||||
} else if (d.pending) {
|
} else if (d.pending) {
|
||||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.6f, 0.6f, 0.6f, 1.0f));
|
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.6f, 0.6f, 0.6f, 1.0f));
|
||||||
ImGui::Text("Fetching");
|
ImGui::Text("Loading");
|
||||||
} else if (d.no_value) {
|
} else if (d.no_value) {
|
||||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 0.0f, 1.0f));
|
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 0.0f, 1.0f));
|
||||||
ImGui::Text("Private?");
|
ImGui::Text("Private?");
|
||||||
@ -109,8 +114,9 @@ void RenderPlayer(int eid) {
|
|||||||
}
|
}
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
}
|
}
|
||||||
|
x += 80;
|
||||||
}
|
}
|
||||||
ImGui::SameLine(610);
|
ImGui::SameLine(x);
|
||||||
ImGui::PushItemWidth(200.0f);
|
ImGui::PushItemWidth(200.0f);
|
||||||
if (ImGui::ColorEdit3("", data.color)) {
|
if (ImGui::ColorEdit3("", data.color)) {
|
||||||
if (!data.color.r && !data.color.b && !data.color.g) {
|
if (!data.color.r && !data.color.b && !data.color.g) {
|
||||||
@ -119,6 +125,7 @@ void RenderPlayer(int eid) {
|
|||||||
data.color.a = 255.0f;
|
data.color.a = 255.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
x += 200;
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
}
|
}
|
||||||
ImGui::PopID();
|
ImGui::PopID();
|
||||||
|
Reference in New Issue
Block a user