Skip to main content
Skip to main content

VehicleTeleportEvent

VehicleTeleportEvent

Parent

Event

Functions

emptyNew

Description

Create instance of Event class

Definition

emptyNew()

Return Values

anyselfinstance of class event

Code

function VehicleTeleportEvent.emptyNew()
local self = Event.new( VehicleTeleportEvent _mt, NetworkNode.CHANNEL_MAIN)
return self
end

run

Description

Run action on receiving side

Definition

run(Connection connection)

Arguments

Connectionconnectionconnection

Code

function VehicleTeleportEvent:run(connection)
if not connection:getIsServer() then
if self.vehicle ~ = nil and self.vehicle:getIsSynchronized() then
g_currentMission:teleportVehicle( self.vehicle, self.x, self.z, self.rotY)
end
end
end