Jump to content

craig141

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by craig141

  1. Just add this code to the LAFireStationStart.script

    			Person mPo1 = Game::CreatePerson("mod:Prototypes/Persons/03 LA Police/dog.e4p", "dog");
    m.AddTransport(&mPo1);

    * Put the code in with the K9 Code so it looks like this

    ActorList l36 = Game::GetActors(VO_K9);
    for(int i=0; i < l36.GetNumActors(); i++)
    {
    Vector K9 = l36.GetActor(0)->GetPosition();
    Vehicle m = Game::CreateVehicle(OBJ_K9, UNNAMED);
    m.EnableBlueLights(false);
    m.SetPosition(K9);
    m.UpdatePlacement();
    m.SetMaxPassengers(1);
    m.SetMaxTransports(1);
    m.SetSpeed(12.0f);
    m.PushActionWait(ACTION_NEWLIST, 5.0f);
    m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 32, false);
    Person mPo1 = Game::CreatePerson("mod:Prototypes/Persons/03 LA Police/dog.e4p", "dog");
    m.AddTransport(&mPo1);
    }

  2. You got

    if (v.GetVehicleType() == OBJ_EMS)
    {
    for(int i=0; i < gate08a.GetNumObjects(); i++)
    {
    GameObject *gate = gate08a.GetObject(i);
    Actor *vogate = vogate08a.GetActor(i);
    Vector GateSnd = gate->GetPosition();
    if (gate->GetUserData() == 0)
    {
    gate->SetUserData(1);
    gate->SetAnimation(ANI_OPEN);
    vogate->SetVirtualObjectTerrain(VOSET_ROAD);
    Audio::PlaySample3D(SND_GATE, GateSnd);
    } else
    {
    gate->SetUserData(0);
    gate->SetAnimation(ANI_CLOSE);
    vogate->SetVirtualObjectTerrain(VOSET_BARRICADE);
    Audio::PlaySample3D(SND_GATE, GateSnd);
    }
    }
    }

    When you need to have

    if (StrCompare(v.GetPrototypeFileName(), OBJ_EMS) ==0)
    {
    for(int i=0; i < gate08a.GetNumObjects(); i++)
    {
    GameObject *gate = gate08a.GetObject(i);
    Actor *vogate = vogate08a.GetActor(i);
    Vector GateSnd = gate->GetPosition();
    if (gate->GetUserData() == 0)
    {
    gate->SetUserData(1);
    gate->SetAnimation(ANI_OPEN);
    vogate->SetVirtualObjectTerrain(VOSET_ROAD);
    Audio::PlaySample3D(SND_GATE, GateSnd);
    } else
    {
    gate->SetUserData(0);
    gate->SetAnimation(ANI_CLOSE);
    vogate->SetVirtualObjectTerrain(VOSET_BARRICADE);
    Audio::PlaySample3D(SND_GATE, GateSnd);
    }
    }
    }

    I fixed it for you, see attachment

×
×
  • Create New...