designer1337 / csgo-cheat-base

simple csgo internal base.
MIT License
242 stars 50 forks source link

How am I supposed to use interfaces::entity_list->get_client_entity() #37

Closed DualByte closed 4 years ago

DualByte commented 4 years ago

When I give it a index like this: for (size_t i = 1; i < 64; i++) { interfaces::entity_list->get_client_entity(i); //How am I supposed to get something out of this? } I cant get anything from that function.

designer1337 commented 4 years ago

auto entity = interfaces::entity_list->get_client_entity(i);

entity->health();

DualByte commented 4 years ago

Oh thank you.

DualByte commented 4 years ago

There is still a one problem. When I do auto entity = interfaces::entity_list->get_client_entity(i); entity->health(); The last line gives me a error that says "expression must have pointer-to-class type"

designer1337 commented 4 years ago
        auto entity = reinterpret_cast<player_t*>(interfaces::entity_list->get_client_entity(i));
DualByte commented 4 years ago

Thank you!