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

  #36  
Старый 30.05.2013, 19:15
FuNkFM
Новичок
Регистрация: 07.04.2013
Сообщений: 29
С нами: 6893459

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

Цитата:
Сообщение от Jesus  

Всем привет, и это урок по добавлению в sobeit CarShot aka CarDrive
В samp.cpp

Код:





Код:
if (cheat_state->_generic.cardrive == 1)
{
    struct actor_info *self = actor_info_get(-1, ACTOR_ALIVE);
    struct vehicle_info *info = vehicle_info_get( -1, 0 );
    if (info != NULL)
    {
    self->fCurrentRotation = -pGame->GetCamera()->GetCameraRotation();
    self->fTargetRotation = self->fCurrentRotation;
    info->base.matrix[4] = sinf(-self->fCurrentRotation);
    info->base.matrix[5] = cosf(-self->fCurrentRotation);
    if (KEY_DOWN('W')) ///W для езды вперед
    {
    info->speed[0] = sinf(-self->fCurrentRotation) * 0.8; ///0.8 скорость
    info->speed[1] = cosf(-self->fCurrentRotation) * 0.8;
    }
    if (KEY_DOWN('S'))///S для езды назад
    {
    info->speed[0] = sinf(-self->fCurrentRotation) * -0.5;
    info->speed[1] = cosf(-self->fCurrentRotation) * -0.5;
    }
    if (KEY_DOWN(0x20))//Space для взлета
    {
    info->speed[2] += 0.05;
    }
    if (KEY_DOWN(0xA2))///LCtrl для приземления
    {
    info->speed[2] -= 0.05;
    }
    if (KEY_DOWN(0xA0))//LShift для торможения
    {
    info->speed[0] = 0.0;
    info->speed[1] = 0.0;
    }
    }
}

1>samp.cpp(2442): error C2059: синтаксическая ошибка: if

1>samp.cpp(2443): error C2143: синтаксическая ошибка: отсутствие ";" перед "{"

1>samp.cpp(2443): error C2447: {: отсутствует заголовок функции (возможно, используется формальный список старого типа)
 
Ответить с цитированием