Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Warsow


Rekomendowane odpowiedzi

Opublikowano

Siema Potrzebny mi jest jakiś haks do warsow

 

 

bo znalazlem tylko to

 

centity_t *getEntityByIndex(int index) { return &cg_entities[index]; }

 

int target = -1;

vec3_t pAngles;

 

qboolean isVisible(int index) {

centity_t *cent = getEntityByIndex(index);

trace_t tr;

 

CG_Trace(&tr, cg.refdef.vieworg, vec3_origin, vec3_origin, cent->ent.origin, cg.chasedNum + 1, MASK_OPAQUE);

 

if (tr.fraction == 1.0)

return qtrue;

else

return qfalse;

}

 

qboolean isValidPlayer(int index) {

if (index != cgs.playerNum || index != cg.chasedNum)

return qfalse;

return qtrue;

}

 

void calcAimingOrigin(int index) {

vec3_t forward, right, up, tAngles;

centity_t *cent = getEntityByIndex(index);

 

VectorCopy(cent->ent.origin, pAngles);

AngleVectors(tAngles, forward, right, up);

 

pAngles = pAngles + forward;

pAngles = pAngles + right;

pAngles = pAngles + up;

}

 

void searchTarget() {

target = -1;

for (int index=0; index < MAX_CLIENTS; index++) {

if (isValidPlayer(index) && isVisible(index)) {

target = index;

break;

}

}

}

 

if (target != -1) {

if (cg_aim->integer) {

float vecScreen[2];

 

calcAimingOrigin(target);

trap_R_TransformVectorToScreen(&cg.refdef, pAngles, vecScreen);

 

if (cg_aim->integer == 1)

SetCursorPos(vecScreen[0], vecScreen[1]);

else if (cg_aim->integer == 2)

VectorCopy(pAngles, cg.refdef.viewangles);

}

if (cg_shoot->integer) {

usercmd_t cmd;

trap_NET_GetUserCmd(trap_NET_GetCurrentUserCmdNum(), &cmd);

 

cmd.buttons |= BUTTON_ATTACK;

}

}

mpcubfluo.png

 

1295889758-U198706.png

 

1281382571-U198706.png

 

1283694067-U198706.png

 

1281380939-U1.png

 

youtube.png

 

 

 

NIE BOĆ ŻYŁA DAJ + JAK STAWIASZ TO MNIE MOBILIZUJE DO DALSZEJ PRACY

Opublikowano

Odświeżam Pomoże ktoś

mpcubfluo.png

 

1295889758-U198706.png

 

1281382571-U198706.png

 

1283694067-U198706.png

 

1281380939-U1.png

 

youtube.png

 

 

 

NIE BOĆ ŻYŁA DAJ + JAK STAWIASZ TO MNIE MOBILIZUJE DO DALSZEJ PRACY

  • 2 tygodnie później...
  • 3 miesiące temu...
Opublikowano

For Warsow Version 0.5

 

Code:

bool isVisible( vec3_t point )

{

trace_t t;

 

glob->Trace(&t,w_cg->view.origin, vec3_origin, vec3_origin,point, -1 , MASK_OPAQUE );

 

return ( t.fraction == 1.0f );

}

Code:

#define VectorSub(a,b,c) (©[0]=(a)[0]-(B)[0],©[1]=(a)[1]-(B)[1],©[2]=(a)[2]-(B)[2])

float AimbotGetDistance( vec3_t origin )

{

vec3_t vector;

VectorSub( origin,w_cg->view.refdef.vieworg, vector );

return ( sqrt( vector[0] * vector[0] + vector[1] * vector[1] + vector[2] * vector[2] ) );

}

Code:

vec3_t aimpoint;

 

#define HeadPoint 20

 

int AimAtFirstPlayer()

{

float leastDist=999;

int PlayerNum = -1;

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

{

if( w_cg_entities.current.solid && i != w_cgs->playerNum + 1 )

{

if(w_cg_entities.current.modelindex )

{

if( w_cg_entities.current.team == TEAM_ALPHA )//TEAM_BETA

{

aimpoint[0] = w_cg_entities.ent.origin[0];

aimpoint[1] = w_cg_entities.ent.origin[1];

aimpoint[2] = w_cg_entities.ent.origin[2];

aimpoint[2] += HeadPoint;

 

if (isVisible( aimpoint ) )

{

if(AimbotGetDistance( w_cg_entities.ent.origin )<leastDist)

{

leastDist = AimbotGetDistance( aimpoint );

PlayerNum=i;

 

}

}

}

}

}

if(PlayerNum!=-1)

{

return PlayerNum;

}

return PlayerNum;

}

Code:

void AimTarget(int i)

{

if(i!=-1)

{

float aX, aY;

aimpoint[0] = w_cg_entities.ent.origin[0];

aimpoint[1] = w_cg_entities.ent.origin[1];

aimpoint[2] = w_cg_entities.ent.origin[2];

 

float * tagHead = aimpoint;

tagHead[2] += HeadPoint;

 

VectorToViewangles(tagHead, aX, aY);

 

/* w_cl is 0x86A940;*/

w_cl->viewangles[YAW] += aX;

w_cl->viewangles[PITCH] += aY;

}

 

}

Code:

void VectorToViewangles(float *fEntTarg, float &fAngleX, float &fAngleY)

{

vec3_t vecEntity, vecAngle;

VectorSubtract(fEntTarg, w_cg->view.refdef.vieworg, vecEntity);

VectorAngles(vecEntity, vecAngle);

vecAngle[PITCH] = -vecAngle[PITCH];

if(vecAngle[YAW] > 180.0f)

vecAngle[YAW] -= 360.0f;

else if(vecAngle[YAW] < -180.0f)

vecAngle[YAW] += 360.0f;

if(vecAngle[PITCH] > 180.0f)

vecAngle[PITCH] -= 360.0f;

else if(vecAngle[PITCH] < -180.0f)

vecAngle[PITCH] += 360.0f;

AnglesToAxis(vecAngle, w_cg->view.refdef.viewaxis );

vecAngle[YAW] -= w_cg->predictedPlayerState.viewangles[YAW];

if(vecAngle[YAW] > 180.0f)

vecAngle[YAW] -= 360.0f;

else if(vecAngle[YAW] < -180.0f)

vecAngle[YAW] += 360.0f;

vecAngle[PITCH] -= w_cg->predictedPlayerState.viewangles[PITCH];

if(vecAngle[PITCH] > 180.0f)

vecAngle[PITCH] -= 360.0f;

else if(vecAngle[PITCH] < -180.0f)

vecAngle[PITCH] -= 360.0f;

fAngleX = vecAngle[YAW];

fAngleY = vecAngle[PITCH];

}

mpcubfluo.png

 

1295889758-U198706.png

 

1281382571-U198706.png

 

1283694067-U198706.png

 

1281380939-U1.png

 

youtube.png

 

 

 

NIE BOĆ ŻYŁA DAJ + JAK STAWIASZ TO MNIE MOBILIZUJE DO DALSZEJ PRACY

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
×
×
  • Dodaj nową pozycję...