running speed

user666

New Member
Joined
Mar 26, 2020
Messages
2
Likes
0
Points
1
Location
Spain
1
#1
hello. i want to make a fast run in c++.
i have no idea how to get offsets (like to speed the game on the running animation).
tried setting this to a value but isn't working g_Players->pLocalPlayer->pSAMP_Actor->pGTA_Ped->runspeed.
thanks
 
Joined
Dec 16, 2018
Messages
82
Likes
36
Points
23
Location
Turkey/Türkiye
#2
A Code from my Project Attack.
Code:
void H_SpeedWalk()
{
    traceLastFunc("H_SpeedWalk()");
    if (cheat_state->genelhileler.iSpeedWalk)
    {
        struct actor_info *self = actor_info_get(ACTOR_SELF, ACTOR_ALIVE);
        if (self == NULL || ACTOR_IS_DEAD(self))
            return;
        if (KEY_DOWN('W'))
        {
            float fPos[3] = { pPedSelf->GetPosition()->fX, pPedSelf->GetPosition()->fY, pPedSelf->GetPosition()->fZ };
            fPos[0] += sinf(-self->fCurrentRotation) * set.General.SpeedWalk_X;
            fPos[1] += cosf(-self->fCurrentRotation) * set.General.SpeedWalk_X;
            fPos[2] += 0.00f;

            pPedSelf->SetPosition(fPos[0], fPos[1], fPos[2]);
        }
    }
}
 
Joined
Sep 27, 2018
Messages
10
Likes
3
Points
3
#4
C++:
DWORD dwAddr = *(DWORD*)((DWORD)g_Players->pLocalPlayer->pSAMP_Actor->pGTA_Ped + 0x14);
dwAddr += 0x30;
*(float*)dwAddr += g_Players->pLocalPlayer->onFootData.fMoveSpeed[0] * 0.135f;
dwAddr += 0x04;
*(float*)dwAddr += g_Players->pLocalPlayer->onFootData.fMoveSpeed[1] * 0.135f;

//Credit: s0b
 
Top