Jump to content

Featured Replies

Posted

If there's any experienced Hack coders here, please tell my why during the middle of a game, the player ESP text somewhat lags behind the player, then after awhile crashes.

 

int Cstrike_SequenceInfo[] = {

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0..9

0, 1, 2, 0, 1, 2, 0, 1, 2, 0, // 10..19

1, 2, 0, 1, 1, 2, 0, 1, 1, 2, // 20..29

0, 1, 2, 0, 1, 2, 0, 1, 2, 0, // 30..39

1, 2, 0, 1, 2, 0, 1, 2, 0, 1, // 40..49

2, 0, 1, 2, 0, 0, 0, 4, 0, 4, // 50..59

0, 5, 0, 5, 0, 0, 1, 1, 2, 0, // 60..69

1, 1, 2, 0, 1, 0, 1, 0, 1, 2, // 70..79

0, 1, 2, 3, 3, 3, 3, 3, 3, 3, // 80..89

3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 90..99

3

};

char* Cstrike_infotext[] = {"", "", "*** RELOADING ***", "", "*** THROWING ***", "*** ARMING C4 ***" };

void DrawEsp ( void )

{

cl_entity_s *ent, *pLocal = pEngfuncs->GetLocalPlayer();

hud_player_info_t entinfo;

float drawpos[3];

for(int i=0;i<33;i++)

{

if(i == pLocal->index) continue;

ent = pEngfuncs->GetEntityByIndex(i);

pEngfuncs->pfnGetPlayerInfo(i, &entinfo);

if(ent->player && ent->curstate.solid && !ent->curstate.spectator)

{

if(CalcScreen(ent->curstate.origin,drawpos))

{

if (GetTeam(ent->index) == 2) {

DrawHudString(drawpos[0],drawpos[1],255,40,40,entinfo.name);

} // terror

if (GetTeam(ent->index) == 1)

{

DrawHudString(drawpos[0],drawpos[1],40,40,255,entinfo.name);

} // counter

int seqinfo = Cstrike_SequenceInfo[ent->curstate.sequence];

DrawHudString(drawpos[0],drawpos[1]+20,40,255,40,Cstrike_infotext[seqinfo]);

 

}

}

}

}

ur code is probly in efficent or your computer sucks... one of the two

well a quick look over doesnt show me anything wrong

ill check it out more when i get home from work and see if i spot anything

I don't think there is any problem in that. The lag could be your comp or a bug somewhere else. Send me your full src later and I'll check.
  • 4 months later...

this is a very old topic, i know i dont care im bored.

 

if your using panzers base call it in drawonhud() :>

  Quote
MAKONG']If there's any experienced Hack coders here, please tell my why during the middle of a game, the player ESP text somewhat lags behind the player, then after awhile crashes.

 

int Cstrike_SequenceInfo[] = {

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0..9

0, 1, 2, 0, 1, 2, 0, 1, 2, 0, // 10..19

1, 2, 0, 1, 1, 2, 0, 1, 1, 2, // 20..29

0, 1, 2, 0, 1, 2, 0, 1, 2, 0, // 30..39

1, 2, 0, 1, 2, 0, 1, 2, 0, 1, // 40..49

2, 0, 1, 2, 0, 0, 0, 4, 0, 4, // 50..59

0, 5, 0, 5, 0, 0, 1, 1, 2, 0, // 60..69

1, 1, 2, 0, 1, 0, 1, 0, 1, 2, // 70..79

0, 1, 2, 3, 3, 3, 3, 3, 3, 3, // 80..89

3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 90..99

3

};

char* Cstrike_infotext[] = {"", "", "*** RELOADING ***", "", "*** THROWING ***", "*** ARMING C4 ***" };

void DrawEsp ( void )

{

cl_entity_s *ent, *pLocal = pEngfuncs->GetLocalPlayer();

hud_player_info_t entinfo;

float drawpos[3];

for(int i=0;i<33;i++)

{

if(i == pLocal->index) continue;

ent = pEngfuncs->GetEntityByIndex(i);

pEngfuncs->pfnGetPlayerInfo(i, &entinfo);

if(ent->player && ent->curstate.solid && !ent->curstate.spectator)

{

if(CalcScreen(ent->curstate.origin,drawpos))

{

if (GetTeam(ent->index) == 2) {

DrawHudString(drawpos[0],drawpos[1],255,40,40,entinfo.name);

} // terror

if (GetTeam(ent->index) == 1)

{

DrawHudString(drawpos[0],drawpos[1],40,40,255,entinfo.name);

} // counter

int seqinfo = Cstrike_SequenceInfo[ent->curstate.sequence];

DrawHudString(drawpos[0],drawpos[1]+20,40,255,40,Cstrike_infotext[seqinfo]);

 

}

}

}

}

 

you didnt line the brackets up, that is whats causing the problem

Guest
This topic is now closed to further replies.