User Tag List

Results 1 to 1 of 1

Thread: Eluna | Added Vehicle Support (Hooks & Methods) and Auction Hooks

  1. #1
    Founder <span style='color: #FF4500'>Tommy</span>'s Avatar
    Join Date
    Apr 2013
    Thanked 1,860 Times in 1,121 Posts

    Eluna | Added Vehicle Support (Hooks & Methods) and Auction Hooks

    After finally finishing up and testing, it is here! Note: The wiki will be updated tomorrow.

    Auction Hooks

    -- RegisterServerEvent(eventId, function)
    • OnAdd(event, ah)
    • OnRemove(event, ah)
    • OnSuccessful(event, ah)
    • OnExpire(event, ah)

    New Vehicle Support:

    Vehicle Hooks

    • RegisterVehicleEvent(eventId, function)
    • OnInstall(event, vehicle)
    • OnUninstall(event, vehicle)
    • OnReset(event, vehicle)
    • OnInstallAccessory(event, vehicle, accessory)
    • OnAddPassenger(event, vehicle, passenger, seatId)
    • OnRemovePassenger(event, vehicle, passenger)

    Vehicle Methods

    • GetBase() -- Returns the vehicle base (unit)
    • GetAvailableSeatCount() -- Returns the available seats
    • GetCreatureEntry() -- Returns the vehicle's entryId
    • GetPassenger(seatId) -- Returns the passenger (unit) by seatId
    • HasEmptySeat(seatId) -- Returns true if the specified seatId is empty
    • IsVehicleInUse() -- Returns true if the vehicle is being used
    • InstallAccessory(entry, seatId, bool minion, typeId, summonTime) -- Installs an accessory
    • ApplyAllImmunities() -- Applies all Vehicle immunities
    • AddPassenger(passenger, seatId) -- Adds a vehicle passenger
    • EjectPassenger(passenger, controller) -- Disabled for now
    • RelocatePassengers() -- Relocates Passengers
    • RemoveAllPassengers() -- Removes all Passengers from the Vehicle
    • RemovePassenger(passenger) -- Removes the passenger from the vehicle
    • RemovePendingEventsForPassenger(passenger) -- Removes pending join events from the passenger
    • Reset(evading) -- Resets the vehicle, the boolean is optional

    Unit Method

    All of the vehicle methods from Unit has been removed and added in Vehicle methods instead

    • GetVehicle() -- Returns the unit's vehicle (if it is a vehicle)

    Test Vehicle Hook / Methods script:

    function OnAddPassenger(event, vehicle, passenger, seatId)
        local unit = vehicle:GetBase()
        print (vehicle:GetCreatureEntry())
        print (unit:GetName())
    function OnRemovePassenger(event, vehicle, passenger)
        local unit = vehicle:GetBase()
        print (vehicle:GetCreatureEntry())
        print (unit:GetName())
    RegisterVehicleEvent(5, OnAddPassenger)
    RegisterVehicleEvent(6, OnRemovePassenger)

  2. The Following 4 Users Say Thank You to Tommy For This Useful Post:

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts