Показать сообщение отдельно

  #256  
Старый 07.08.2015, 21:05
CissCass
Новичок
Регистрация: 04.08.2015
Сообщений: 5
С нами: 5670904

Репутация: 0
По умолчанию

Код:





Код:
#define FUNC_IsLineOfSightClear 0x56A490

bool GTAfunc_IsLineOfSightClear(CVector *vecStart, CVector *vecEnd, bool bCheckBuildings, bool bCheckVehicles, bool bCheckPeds, bool bCheckObjects, bool bCheckDummies, bool bSeeThroughStuff, bool bIgnoreSomeObjectsForCamera)
{
    DWORD    dwFunc = FUNC_IsLineOfSightClear;
    bool    bReturn = false;
    __asm
    {
        push bIgnoreSomeObjectsForCamera
            push bSeeThroughStuff
            push bCheckDummies
            push bCheckObjects
            push bCheckPeds
            push bCheckVehicles
            push bCheckBuildings
            push vecEnd
            push vecStart
            call dwFunc
            mov bReturn, al
            add esp, 0x24
    }

    return bReturn;
}

void t(shotr int id)
{
CVector *vect1;
                vect1->fX = SF->getSAMP()->getPlayers()->pLocalPlayer->onFootData.fPosition[0];
                vect1->fY = SF->getSAMP()->getPlayers()->pLocalPlayer->onFootData.fPosition[1];
                vect1->fZ = SF->getSAMP()->getPlayers()->pLocalPlayer->onFootData.fPosition[2];
                CVector *vect2;
                vect2->fX = SF->getSAMP()->getPlayers()->pRemotePlayer[id]->pPlayerData->onFootData.fPosition[0];
                vect2->fY = SF->getSAMP()->getPlayers()->pRemotePlayer[id]->pPlayerData->onFootData.fPosition[1];
                vect2->fZ = SF->getSAMP()->getPlayers()->pRemotePlayer[id]->pPlayerData->onFootData.fPosition[2];
                if (GTAfunc_IsLineOfSightClear(vect1, vect2, true, true,true, true, true, false, false))
                    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 255, 0), "LLLLt");
}


Почему при вызове GTAfunc_IsLineOfSightClear крашит?
 
Ответить с цитированием