![]() |
SAMP API как реализовать ходьбу по координатам
|
Информация - Полезные функции
uint8_t getPlayerWeaponModelID(int iPlayerID) { if (g_Players == NULL || iPlayerID SAMP_MAX_PLAYERS) return NULL; if (iPlayerID == g_Players->sLocalPlayerID) { if (g_Players->pLocalPlayer->pSAMP_Actor == NULL) return NULL... www.blast.hk и добавь зажатие W |
Не работает:
[CODE] float x = 2197.28 ; float y = - 2188.46 ; DWORD * pActorMtrx = ( DWORD * ) ( ( * ptrActor ) + 0x14 ) ; CVector2D pPos ( * ( float * ) ( ( * pActorMtrx ) + 0x30 ) , * ( float * ) ( ( * pActorMtrx ) + 0x34 ) ) ; CVector2D cPos ( * ( float * ) ( 0xB6F9CC ) , * ( float * ) ( 0xB6F9D0 ) ) ; float ac = sqrt ( pow ( fabs ( cPos . x - x ) , 2 ) + pow ( fabs ( cPos . y - y ) , 2 ) ) ; float alpha = asin ( fabs ( cPos . x - x ) / ac ) ; float beta = acos ( fabs ( cPos . x - x ) / ac ) ; if ( ( pPos . x > x ) && ( pPos . y x ) && ( pPos . y > y ) ) * xCam = beta ; if ( ( pPos . x y ) ) * xCam = ( alpha + ( 1.57 ) ) ; if ( ( pPos . x GetPosition ( ) ; float dist = ( vect . y , vect . x ) ; do { if ( active ) { if ( ! sprint ) SAMP :: isKeyPressed ( 87 ) ; else { SAMP :: isKeyPressed ( 87 ) ; } } } while ( active || dist Не работает |
[QUOTE="PED"]
Не работает: [CODE] float x = 2197.28 ; float y = - 2188.46 ; DWORD * pActorMtrx = ( DWORD * ) ( ( * ptrActor ) + 0x14 ) ; CVector2D pPos ( * ( float * ) ( ( * pActorMtrx ) + 0x30 ) , * ( float * ) ( ( * pActorMtrx ) + 0x34 ) ) ; CVector2D cPos ( * ( float * ) ( 0xB6F9CC ) , * ( float * ) ( 0xB6F9D0 ) ) ; float ac = sqrt ( pow ( fabs ( cPos . x - x ) , 2 ) + pow ( fabs ( cPos . y - y ) , 2 ) ) ; float alpha = asin ( fabs ( cPos . x - x ) / ac ) ; float beta = acos ( fabs ( cPos . x - x ) / ac ) ; if ( ( pPos . x > x ) && ( pPos . y x ) && ( pPos . y > y ) ) * xCam = beta ; if ( ( pPos . x y ) ) * xCam = ( alpha + ( 1.57 ) ) ; if ( ( pPos . x GetPosition ( ) ; float dist = ( vect . y , vect . x ) ; do { if ( active ) { if ( ! sprint ) SAMP :: isKeyPressed ( 87 ) ; else { SAMP :: isKeyPressed ( 87 ) ; } } } while ( active || dist |
Цитата:
|
Можешь юзать функции: SendInput, keybd_event и т.д...
|
| Время: 15:48 |