alt

package
v0.0.0-...-f7341fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDimension int32 = 0
	MaxDimension     int32 = math.MaxInt32
	MinDimension     int32 = math.MinInt32
)

Variables

View Source
var On = &eventManager{}
View Source
var Resource *resource

Functions

func Branch

func Branch() string

func Debug

func Debug() bool

func DeleteMetaData

func DeleteMetaData(key string)

func DeleteSyncedMetaData

func DeleteSyncedMetaData(key string)

func EmitAllClients

func EmitAllClients(eventName string, args ...interface{})

func EmitClient

func EmitClient(player *Player, eventName string, args ...interface{})

func EmitClients

func EmitClients(players []*Player, eventName string, args ...interface{})

func EmitServer

func EmitServer(eventName string, args ...interface{})

func Export

func Export(name string, export interface{}) bool

func FileExists

func FileExists(str string) bool

func FileRead

func FileRead(str string) string

func GetEntityByID

func GetEntityByID(id uint16) interface{}

func GetMetaData

func GetMetaData(key string) interface{}

func GetSyncedMetaData

func GetSyncedMetaData(key string) interface{}

func HasMetaData

func HasMetaData(key string) bool

func HasSyncedMetaData

func HasSyncedMetaData(key string) bool

func Hash

func Hash(str string) uint32

func Import

func Import(resource string, name string) interface{}

func LogColored

func LogColored(args ...interface{})

func LogDebug

func LogDebug(args ...interface{})

func LogError

func LogError(args ...interface{})

func LogInfo

func LogInfo(args ...interface{})

func LogWarning

func LogWarning(args ...interface{})

func NewArgArray

func NewArgArray(args []interface{}) (*C.struct_data, C.ulonglong)

NewArgArray internally used to convert values to CMValue array

func RestartResource

func RestartResource(name string) bool

func RootDir

func RootDir() string

func SDKVersion

func SDKVersion() uint32

func SetMetaData

func SetMetaData(key string, value interface{})

func SetPassword

func SetPassword(password string)

func SetSyncedMetaData

func SetSyncedMetaData(key string, value interface{})

func StartResource

func StartResource(name string) bool

func StopResource

func StopResource(name string)

func Version

func Version() string

Types

type Base

type Base interface {
	HasMetaData(key string) bool
	GetMetaData(key string) interface{}
	SetMetaData(key string, value interface{})
	DeleteMetaData(key string)
}

type BaseObject

type BaseObject struct {
	Ptr  unsafe.Pointer
	Type BaseObjectType
}

func (BaseObject) DeleteMetaData

func (b BaseObject) DeleteMetaData(key string)

func (BaseObject) Destroy

func (b BaseObject) Destroy()

func (BaseObject) GetMetaData

func (b BaseObject) GetMetaData(key string) interface{}

func (BaseObject) HasMetaData

func (b BaseObject) HasMetaData(key string) bool

func (BaseObject) SetMetaData

func (b BaseObject) SetMetaData(key string, value interface{})

func (BaseObject) Valid

func (b BaseObject) Valid() bool

type BaseObjectType

type BaseObjectType = uint8
const (
	PlayerObject BaseObjectType = iota
	VehicleObject
	BlipObject
	WebviewObject
	VoiceChannelObject
	ColshapeObject
	CheckpointObject
	WebSocketClientObject
	HttpClientObject
	AudioObject
	LocalPlayerObject
)

type Checkpoint

type Checkpoint struct {
	ColShape
}

func CreateCheckpoint

func CreateCheckpoint(checkpointType uint8, x float32, y float32, z float32, radius float32, height float32, color RGBA) *Checkpoint

CreateCheckpoint Create a checkpoint ! This method is unfinished in alt:V use at your own risk !

func NewCheckpoint

func NewCheckpoint(cp unsafe.Pointer) *Checkpoint

func (Checkpoint) CheckpointType

func (c Checkpoint) CheckpointType() uint8

func (Checkpoint) Color

func (c Checkpoint) Color() RGBA

func (Checkpoint) Height

func (c Checkpoint) Height() float32

func (Checkpoint) NextPosition

func (c Checkpoint) NextPosition() Vector3

func (Checkpoint) Radius

func (c Checkpoint) Radius() float32

func (Checkpoint) SetCheckpointType

func (c Checkpoint) SetCheckpointType(checkpointType uint8)

func (Checkpoint) SetColor

func (c Checkpoint) SetColor(color RGBA)

func (Checkpoint) SetHeight

func (c Checkpoint) SetHeight(height float32)

func (Checkpoint) SetNextPosition

func (c Checkpoint) SetNextPosition(pos Vector3)

func (Checkpoint) SetRadius

func (c Checkpoint) SetRadius(radius float32)

type Cloth

type Cloth struct {
	DrawableId uint16
	TextureId  uint8
	PaletteId  uint8
}

type Cmd

type Cmd interface {
	Name() string
	Execute(p *Player)
}

type ColShape

type ColShape struct {
	WorldObject
}

func CreateColShapeCircle

func CreateColShapeCircle(x float32, y float32, z float32, radius float32) *ColShape

func CreateColShapeCube

func CreateColShapeCube(x1 float32, y1 float32, z1 float32, x2 float32, y2 float32, z2 float32) *ColShape

func CreateColShapeCylinder

func CreateColShapeCylinder(x float32, y float32, z float32, radius float32, height float32) *ColShape

func CreateColShapeRectangle

func CreateColShapeRectangle(x1 float32, y1 float32, x2 float32, y2 float32, z float32) *ColShape

func CreateColShapeSphere

func CreateColShapeSphere(x float32, y float32, z float32, radius float32) *ColShape

func NewColShape

func NewColShape(c unsafe.Pointer) *ColShape

func (ColShape) ColShapeType

func (c ColShape) ColShapeType() int8

func (ColShape) IsEntityIn

func (c ColShape) IsEntityIn(entity *Entity) bool

func (ColShape) IsPlayersOnly

func (c ColShape) IsPlayersOnly() bool

func (ColShape) IsPointIn

func (c ColShape) IsPointIn(pos Vector3) bool

func (ColShape) SetPlayersOnly

func (c ColShape) SetPlayersOnly(state bool)

type DlcCloth

type DlcCloth struct {
	Dlc        uint32
	DrawableId uint16
	TextureId  uint8
	PaletteId  uint8
}

type DlcProp

type DlcProp struct {
	Dlc        uint32
	DrawableId uint16
	TextureId  uint8
}

type Entity

type Entity struct {
	WorldObject
}

func NewEntity

func NewEntity(e unsafe.Pointer) *Entity

func (Entity) AttachToEntity

func (e Entity) AttachToEntity(entity Entity, otherBoneIndex int16, myBoneIndex int16, position Vector3, rotation Vector3, collision bool, noFixedRotation bool)

AttachToEntity TODO: make capi accept x, y, z instead of Position and Rotation

func (Entity) DeleteStreamSyncedMetaData

func (e Entity) DeleteStreamSyncedMetaData(key string)

func (Entity) DeleteSyncedMetaData

func (e Entity) DeleteSyncedMetaData(key string)

func (Entity) Detach

func (e Entity) Detach()

func (Entity) GetStreamSyncedMetaData

func (e Entity) GetStreamSyncedMetaData(key string) interface{}

func (Entity) GetSyncedMetaData

func (e Entity) GetSyncedMetaData(key string) interface{}

func (Entity) HasStreamSyncedMetaData

func (e Entity) HasStreamSyncedMetaData(key string) bool

func (Entity) HasSyncedMetaData

func (e Entity) HasSyncedMetaData(key string) bool

func (Entity) ID

func (e Entity) ID() uint16

func (Entity) Model

func (e Entity) Model() uint32

func (Entity) NetworkOwner

func (e Entity) NetworkOwner() *Player

func (Entity) Rotation

func (e Entity) Rotation() Vector3

func (Entity) SetNetworkOwner

func (e Entity) SetNetworkOwner(owner *Player, disableMigration bool)

func (Entity) SetRotation

func (e Entity) SetRotation(rotation Vector3)

func (Entity) SetStreamSyncedMetaData

func (e Entity) SetStreamSyncedMetaData(key string, value interface{})

func (Entity) SetStreamed

func (e Entity) SetStreamed(toggle bool)

func (Entity) SetSyncedMetaData

func (e Entity) SetSyncedMetaData(key string, value interface{})

func (Entity) SetVisible

func (e Entity) SetVisible(toggle bool)

func (Entity) Streamed

func (e Entity) Streamed() bool

func (Entity) Visible

func (e Entity) Visible() bool

type FireInfo

type FireInfo struct {
	WeaponHash uint32
	Position   Vector3
}

type Invoker

type Invoker struct {
	// contains filtered or unexported fields
}

func (Invoker) ExecuteCmd

func (i Invoker) ExecuteCmd(p *Player, name string)

func (Invoker) RegisterCmd

func (i Invoker) RegisterCmd(c Cmd)

type MValue

type MValue struct {
	Ptr   unsafe.Pointer
	Type  MValueType
	Value interface{}
}

func CreateMValue

func CreateMValue(value interface{}) *MValue

func (MValue) GetType

func (v MValue) GetType() MValueType

func (MValue) GetValue

func (v MValue) GetValue() interface{}

type MValueFunc

type MValueFunc = func(args ...interface{}) interface{}

type MValueType

type MValueType = uint8
const (
	MValueNone MValueType = iota
	MValueNil
	MValueBool
	MValueInt
	MValueUInt
	MValueDouble
	MValueString
	MValueList
	MValueDict
	MValueBaseObject
	MValueFunction
	MValueVector3
	MValueRGBA
	MValueByteArray
	MValueVector2
)

type NumberPlateStyle

type NumberPlateStyle = uint8
const (
	BlueWhite NumberPlateStyle = iota
	BlueWhite2
	BlueWhite3
	Yankton
	YellowBlack
	YellowBlue
)

type Player

type Player struct {
	Entity
}

func GetPlayers

func GetPlayers() []*Player

func GetPlayersByName

func GetPlayersByName(name string) []*Player

func NewPlayer

func NewPlayer(p unsafe.Pointer) *Player

func (Player) AddWeaponComponent

func (p Player) AddWeaponComponent(weapon uint32, component uint32)

func (Player) AimPos

func (p Player) AimPos() Vector3

func (Player) Armour

func (p Player) Armour() uint16

func (Player) AuthToken

func (p Player) AuthToken() string

func (Player) ClearBloodDamage

func (p Player) ClearBloodDamage()

func (Player) ClearProps

func (p Player) ClearProps(component uint8)

func (Player) Clothes

func (p Player) Clothes(component uint8) Cloth

func (Player) CurrentWeapon

func (p Player) CurrentWeapon() uint32

func (Player) CurrentWeaponComponents

func (p Player) CurrentWeaponComponents() []uint32

func (Player) CurrentWeaponTintIndex

func (p Player) CurrentWeaponTintIndex() uint32

func (Player) DlcClothes

func (p Player) DlcClothes(component uint8) DlcCloth

func (Player) DlcProps

func (p Player) DlcProps(component uint8) DlcProp

func (*Player) Emit

func (p *Player) Emit(eventName string, args ...interface{})

func (Player) EntityAimOffset

func (p Player) EntityAimOffset() Vector3

func (Player) EntityAimingAt

func (p Player) EntityAimingAt() *Entity

EntityAimingAt TODO: make proper entity struct

func (Player) GiveWeapon

func (p Player) GiveWeapon(weapon uint32, ammo int64, selectWeapon bool)

func (Player) HasWeaponComponent

func (p Player) HasWeaponComponent(weapon uint32, component uint32) bool

func (Player) HeadRotation

func (p Player) HeadRotation() Vector3

func (Player) Health

func (p Player) Health() float32

func (Player) HwidExHash

func (p Player) HwidExHash() uint64

func (Player) HwidHash

func (p Player) HwidHash() uint64

func (Player) IP

func (p Player) IP() string

func (Player) Invincible

func (p Player) Invincible() bool

func (Player) IsAiming

func (p Player) IsAiming() bool

func (Player) IsConnected

func (p Player) IsConnected() bool

func (Player) IsDead

func (p Player) IsDead() bool

func (Player) IsEntityInStreamingRange

func (p Player) IsEntityInStreamingRange(entity Entity) bool

func (Player) IsFlashlightActive

func (p Player) IsFlashlightActive() bool

func (Player) IsInRagdoll

func (p Player) IsInRagdoll() bool

func (Player) IsInVehicle

func (p Player) IsInVehicle() bool

func (Player) IsJumping

func (p Player) IsJumping() bool

func (Player) IsReloading

func (p Player) IsReloading() bool

func (Player) IsShooting

func (p Player) IsShooting() bool

func (Player) Kick

func (p Player) Kick(reason string)

func (Player) MaxArmour

func (p Player) MaxArmour() uint16

func (Player) MaxHealth

func (p Player) MaxHealth() uint16

func (Player) MoveSpeed

func (p Player) MoveSpeed() float32

func (Player) Name

func (p Player) Name() string

func (Player) Ping

func (p Player) Ping() uint32

func (Player) Props

func (p Player) Props(component uint8) Prop

func (Player) RemoveAllWeapons

func (p Player) RemoveAllWeapons()

func (Player) RemoveWeapon

func (p Player) RemoveWeapon(weapon uint32)

func (Player) RemoveWeaponComponent

func (p Player) RemoveWeaponComponent(weapon uint32, component uint32)

func (Player) Seat

func (p Player) Seat() uint8

func (Player) SetArmour

func (p Player) SetArmour(armour uint16)

func (Player) SetClothes

func (p Player) SetClothes(component uint8, drawable uint16, texture uint8, palette uint8)

func (Player) SetCurrentWeapon

func (p Player) SetCurrentWeapon(weapon uint32)

func (Player) SetDateTime

func (p Player) SetDateTime(day int, month int, year int, hour int, minute int, second int)

func (Player) SetDlcClothes

func (p Player) SetDlcClothes(component uint8, drawable uint16, texture uint8, palette uint8, dlc uint32)

func (Player) SetDlcProps

func (p Player) SetDlcProps(component uint8, drawable uint16, texture uint8, dlc uint32)

func (Player) SetHealth

func (p Player) SetHealth(health uint16)

func (Player) SetIntoVehicle

func (p Player) SetIntoVehicle(v *Vehicle, seat uint8)

func (Player) SetInvincible

func (p Player) SetInvincible(toggle bool)

func (Player) SetMaxArmour

func (p Player) SetMaxArmour(maxArmour uint16)

func (Player) SetMaxHealth

func (p Player) SetMaxHealth(maxHealth uint16)

func (Player) SetModel

func (p Player) SetModel(model uint32)

func (Player) SetProps

func (p Player) SetProps(component uint8, drawable uint16, texture uint8)

func (Player) SetWeaponTintIndex

func (p Player) SetWeaponTintIndex(weapon uint32, tintIndex uint8)

func (Player) SetWeather

func (p Player) SetWeather(weather uint32)

func (Player) SocialID

func (p Player) SocialID() uint64

func (Player) Spawn

func (p Player) Spawn(pos Vector3, delayMs uint32)

func (Player) Vehicle

func (p Player) Vehicle() *Vehicle

func (Player) WeaponTintIndex

func (p Player) WeaponTintIndex(weapon uint32) uint32

type Prop

type Prop struct {
	DrawableId uint16
	TextureId  uint8
}

type RGBA

type RGBA struct {
	R uint8
	G uint8
	B uint8
	A uint8
}

type RadioStation

type RadioStation = uint8
const (
	BlaineCountyRadio RadioStation = iota
	ChannelX
	EastLosFm
	FlyloFm
	LosSantosRockRadio
	NonStopPopFm
	RadioLosSantos
	RadioMirrorPark
	RadioOff
	RebelRadio
	SelfRadio
	SoulwaxFm
	Space
	TheBlueArk
	TheLab
	TheLowdown
	VinewoodBoulevardRadio
	WestCoastClassics
	WestCoastTalkRadio
	WorldWideFm
)

type Vector2

type Vector2 struct {
	X float32
	Y float32
}

type Vector3

type Vector3 struct {
	X float32
	Y float32
	Z float32
}

type Vehicle

type Vehicle struct {
	Entity
}

func CreateVehicle

func CreateVehicle(model uint32, pos Vector3, rot Vector3) (*Vehicle, error)

func GetVehicles

func GetVehicles() []*Vehicle

func NewVehicle

func NewVehicle(p unsafe.Pointer) *Vehicle

func (Vehicle) AppearanceDataBase64

func (v Vehicle) AppearanceDataBase64() string

func (Vehicle) ArmoredWindowHealth

func (v Vehicle) ArmoredWindowHealth(window uint8) float32

func (Vehicle) ArmoredWindowShootCount

func (v Vehicle) ArmoredWindowShootCount(window uint8) uint8

func (Vehicle) Attached

func (v Vehicle) Attached() *Vehicle

func (Vehicle) AttachedTo

func (v Vehicle) AttachedTo() *Vehicle

func (Vehicle) BodyAdditionalHealth

func (v Vehicle) BodyAdditionalHealth() uint32

func (Vehicle) BodyHealth

func (v Vehicle) BodyHealth() uint32

func (Vehicle) BumperDamageLevel

func (v Vehicle) BumperDamageLevel(bumper uint8) uint8

func (Vehicle) CustomTires

func (v Vehicle) CustomTires() bool

func (Vehicle) DamageDataBase64

func (v Vehicle) DamageDataBase64() string

func (Vehicle) DashboardColor

func (v Vehicle) DashboardColor() uint8

func (Vehicle) DirtLevel

func (v Vehicle) DirtLevel() uint8

func (Vehicle) DoesWheelHasTire

func (v Vehicle) DoesWheelHasTire(wheel uint8) bool

func (Vehicle) DoorState

func (v Vehicle) DoorState(door uint8) uint8

func (Vehicle) Driver

func (v Vehicle) Driver() *Player

func (Vehicle) EngineHealth

func (v Vehicle) EngineHealth() int32

func (Vehicle) GameStateBase64

func (v Vehicle) GameStateBase64() string

func (Vehicle) HasArmoredWindows

func (v Vehicle) HasArmoredWindows() bool

func (Vehicle) HeadlightColor

func (v Vehicle) HeadlightColor() uint8

func (Vehicle) HealthDataBase64

func (v Vehicle) HealthDataBase64() string

func (Vehicle) InteriorColor

func (v Vehicle) InteriorColor() uint8

func (Vehicle) IsDaylightOn

func (v Vehicle) IsDaylightOn() bool

func (Vehicle) IsDestroyed

func (v Vehicle) IsDestroyed() bool

func (Vehicle) IsEngineOn

func (v Vehicle) IsEngineOn() bool

func (Vehicle) IsExtraOn

func (v Vehicle) IsExtraOn(id uint8) bool

func (Vehicle) IsFlamethrowerActive

func (v Vehicle) IsFlamethrowerActive() bool

func (Vehicle) IsHandbrakeActive

func (v Vehicle) IsHandbrakeActive() bool

func (Vehicle) IsLightDamaged

func (v Vehicle) IsLightDamaged(light uint8) bool

func (Vehicle) IsManualEngineControl

func (v Vehicle) IsManualEngineControl() bool

func (Vehicle) IsNeonActive

func (v Vehicle) IsNeonActive() bool

func (Vehicle) IsNightlightOn

func (v Vehicle) IsNightlightOn() bool

func (Vehicle) IsPrimaryColorRGB

func (v Vehicle) IsPrimaryColorRGB() bool

func (Vehicle) IsSecondaryColorRGB

func (v Vehicle) IsSecondaryColorRGB() bool

func (Vehicle) IsSirenActive

func (v Vehicle) IsSirenActive() bool

func (Vehicle) IsSpecialLightDamaged

func (v Vehicle) IsSpecialLightDamaged(light uint8) bool

func (Vehicle) IsTireSmokeColorCustom

func (v Vehicle) IsTireSmokeColorCustom() bool

func (Vehicle) IsWheelBurst

func (v Vehicle) IsWheelBurst(wheel uint8) bool

func (Vehicle) IsWheelDetached

func (v Vehicle) IsWheelDetached(wheel uint8) bool

func (Vehicle) IsWheelOnFire

func (v Vehicle) IsWheelOnFire(wheel uint8) bool

func (Vehicle) IsWindowDamaged

func (v Vehicle) IsWindowDamaged(window uint8) bool

func (Vehicle) IsWindowOpened

func (v Vehicle) IsWindowOpened(window uint8) bool

func (Vehicle) LightsMultiplier

func (v Vehicle) LightsMultiplier() float32

func (Vehicle) Livery

func (v Vehicle) Livery() uint8

func (Vehicle) LockState

func (v Vehicle) LockState() uint8

func (Vehicle) Mod

func (v Vehicle) Mod(category VehicleModCategory) uint8

func (Vehicle) ModKit

func (v Vehicle) ModKit() uint8

func (Vehicle) ModKitsCount

func (v Vehicle) ModKitsCount() uint8

func (Vehicle) ModsCount

func (v Vehicle) ModsCount(category VehicleModCategory) uint8

func (Vehicle) NeonActive

func (v Vehicle) NeonActive() (front bool, left bool, right bool, back bool)

func (Vehicle) NeonColor

func (v Vehicle) NeonColor() RGBA

func (Vehicle) NumberPlateIndex

func (v Vehicle) NumberPlateIndex() uint32

func (Vehicle) NumberPlateText

func (v Vehicle) NumberPlateText() string

func (Vehicle) PartBulletHoles

func (v Vehicle) PartBulletHoles(part uint8) uint8

func (Vehicle) PartDamageLevel

func (v Vehicle) PartDamageLevel(part uint8) uint8

func (Vehicle) PearlColor

func (v Vehicle) PearlColor() uint8

func (Vehicle) PetrolTankHealth

func (v Vehicle) PetrolTankHealth() int32

func (Vehicle) PrimaryColor

func (v Vehicle) PrimaryColor() uint8

func (Vehicle) PrimaryColorRGB

func (v Vehicle) PrimaryColorRGB() RGBA

func (Vehicle) RadioStationIndex

func (v Vehicle) RadioStationIndex() uint32

func (Vehicle) RearWheelVariation

func (v Vehicle) RearWheelVariation() uint8

func (Vehicle) RepairsCount

func (v Vehicle) RepairsCount() uint8

func (Vehicle) RoofLivery

func (v Vehicle) RoofLivery() uint8

func (Vehicle) RoofState

func (v Vehicle) RoofState() uint8

func (Vehicle) ScriptDataBase64

func (v Vehicle) ScriptDataBase64() string

func (Vehicle) SecondaryColor

func (v Vehicle) SecondaryColor() uint8

func (Vehicle) SecondaryColorRGB

func (v Vehicle) SecondaryColorRGB() RGBA

func (Vehicle) SetArmoredWindowHealth

func (v Vehicle) SetArmoredWindowHealth(windowId uint8, health float32)

func (Vehicle) SetArmoredWindowShootCount

func (v Vehicle) SetArmoredWindowShootCount(windowId uint8, count uint8)

func (Vehicle) SetBodyAdditionalHealth

func (v Vehicle) SetBodyAdditionalHealth(health uint32)

func (Vehicle) SetBodyHealth

func (v Vehicle) SetBodyHealth(health uint32)

func (Vehicle) SetBumperDamageLevel

func (v Vehicle) SetBumperDamageLevel(bumperId uint8, damageLevel uint8)

func (Vehicle) SetCustomTires

func (v Vehicle) SetCustomTires(state bool)

func (Vehicle) SetDashboardColor

func (v Vehicle) SetDashboardColor(color uint8)

func (Vehicle) SetDirtLevel

func (v Vehicle) SetDirtLevel(dirt uint8)

func (Vehicle) SetDoorState

func (v Vehicle) SetDoorState(doorId uint8, state uint8)

func (Vehicle) SetEngineHealth

func (v Vehicle) SetEngineHealth(health int32)

func (Vehicle) SetEngineOn

func (v Vehicle) SetEngineOn(state bool)

func (Vehicle) SetFixed

func (v Vehicle) SetFixed()

func (Vehicle) SetHeadlightColor

func (v Vehicle) SetHeadlightColor(color uint8)

func (Vehicle) SetInteriorColor

func (v Vehicle) SetInteriorColor(color uint8)

func (Vehicle) SetLightDamaged

func (v Vehicle) SetLightDamaged(lightId uint8, isDamaged bool)

func (Vehicle) SetLightsMultiplier

func (v Vehicle) SetLightsMultiplier(multiplier float32)

func (Vehicle) SetLivery

func (v Vehicle) SetLivery(livery uint8)

func (Vehicle) SetLockState

func (v Vehicle) SetLockState(state uint8)

func (Vehicle) SetManualEngineControl

func (v Vehicle) SetManualEngineControl(state bool)

func (Vehicle) SetMod

func (v Vehicle) SetMod(category uint8, id uint8) bool

func (Vehicle) SetModKit

func (v Vehicle) SetModKit(id uint8) bool

func (Vehicle) SetNeonActive

func (v Vehicle) SetNeonActive(front bool, left bool, right bool, back bool)

func (Vehicle) SetNeonColor

func (v Vehicle) SetNeonColor(color RGBA)

func (Vehicle) SetNumberplateIndex

func (v Vehicle) SetNumberplateIndex(index uint32)

func (Vehicle) SetNumberplateText

func (v Vehicle) SetNumberplateText(text string)

func (Vehicle) SetPartBulletHoles

func (v Vehicle) SetPartBulletHoles(partId uint8, shootsCount uint8)

func (Vehicle) SetPartDamageLevel

func (v Vehicle) SetPartDamageLevel(partId uint8, damage uint8)

func (Vehicle) SetPearlColor

func (v Vehicle) SetPearlColor(color uint8)

func (Vehicle) SetPetrolTankHealth

func (v Vehicle) SetPetrolTankHealth(health int32)

func (Vehicle) SetPrimaryColor

func (v Vehicle) SetPrimaryColor(color uint8)

func (Vehicle) SetPrimaryColorRGB

func (v Vehicle) SetPrimaryColorRGB(color RGBA)

func (Vehicle) SetRadioStationIndex

func (v Vehicle) SetRadioStationIndex(stationIndex uint32)

func (Vehicle) SetRearWheels

func (v Vehicle) SetRearWheels(variation uint8)

func (Vehicle) SetRoofLivery

func (v Vehicle) SetRoofLivery(roofLivery uint8)

func (Vehicle) SetRoofState

func (v Vehicle) SetRoofState(state uint8)

func (Vehicle) SetSecondaryColor

func (v Vehicle) SetSecondaryColor(color uint8)

func (Vehicle) SetSecondaryColorRGB

func (v Vehicle) SetSecondaryColorRGB(color RGBA)

func (Vehicle) SetSirenActive

func (v Vehicle) SetSirenActive(state bool)

func (Vehicle) SetSpecialDarkness

func (v Vehicle) SetSpecialDarkness(value uint8)

func (Vehicle) SetSpecialLightDamaged

func (v Vehicle) SetSpecialLightDamaged(specialLightId uint8, isDamaged bool)

func (Vehicle) SetTireSmokeColor

func (v Vehicle) SetTireSmokeColor(color RGBA)

func (Vehicle) SetWheelBurst

func (v Vehicle) SetWheelBurst(wheelId uint8, state bool)

func (Vehicle) SetWheelColor

func (v Vehicle) SetWheelColor(color uint8)

func (Vehicle) SetWheelDetached

func (v Vehicle) SetWheelDetached(wheelId uint8, state bool)

func (Vehicle) SetWheelFixed

func (v Vehicle) SetWheelFixed(wheelId uint8)

func (Vehicle) SetWheelHasTire

func (v Vehicle) SetWheelHasTire(wheelId uint8, state bool)

func (Vehicle) SetWheelHealth

func (v Vehicle) SetWheelHealth(wheelId uint8, health float32)

func (Vehicle) SetWheelOnFire

func (v Vehicle) SetWheelOnFire(wheelId uint8, state bool)

func (Vehicle) SetWheels

func (v Vehicle) SetWheels(wheelType uint8, variation uint8)

func (Vehicle) SetWindowDamaged

func (v Vehicle) SetWindowDamaged(windowId uint8, isDamaged bool)

func (Vehicle) SetWindowOpened

func (v Vehicle) SetWindowOpened(windowId uint8, state bool)

func (Vehicle) SetWindowTint

func (v Vehicle) SetWindowTint(tint uint8)

func (Vehicle) SpecialDarkness

func (v Vehicle) SpecialDarkness() uint8

func (Vehicle) TireSmokeColor

func (v Vehicle) TireSmokeColor() RGBA

func (Vehicle) ToggleExtra

func (v Vehicle) ToggleExtra(extra uint8, state bool)

func (Vehicle) WheelColor

func (v Vehicle) WheelColor() uint8

func (Vehicle) WheelHealth

func (v Vehicle) WheelHealth(wheel uint8) float32

func (Vehicle) WheelType

func (v Vehicle) WheelType() uint8

func (Vehicle) WheelVariation

func (v Vehicle) WheelVariation() uint8

func (Vehicle) WheelsCount

func (v Vehicle) WheelsCount() uint8

func (Vehicle) WindowTint

func (v Vehicle) WindowTint() uint8

type VehicleBumper

type VehicleBumper = uint8
const (
	Front VehicleBumper = iota
	Rear
)

type VehicleBumperDamage

type VehicleBumperDamage = uint8
const (
	BumperDamaged VehicleBumperDamage = iota
	BumperNone
	BumperNotDamaged
)

type VehicleDoor

type VehicleDoor = uint8
const (
	DoorDriverFront VehicleDoor = iota
	DoorDriverRear
	DoorHood
	DoorPassengerFront
	DoorPassengerRear
	DoorTrunk
)

type VehicleDoorState

type VehicleDoorState = uint8
const (
	Closed VehicleDoorState = iota
	OpenedLevel1
	OpenedLevel2
	OpenedLevel3
	OpenedLevel4
	OpenedLevel5
	OpenedLevel6
	OpenedLevel7
	Unknown
)

type VehicleLockState

type VehicleLockState = uint8
const (
	ForceDoorsShut VehicleLockState = iota
	InitiallyLocked
	LockPlayerInside
	Locked
	LockedCanBeDamaged
	LockoutPlayerOnly
	None
	Unlocked
)

type VehicleModCategory

type VehicleModCategory = uint8
const (
	Aerials VehicleModCategory = iota
	AirFilter
	ArchCover
	Armor
	BackWheels
	Brakes
	ColumnShifterLeavers
	Dashboard
	Dial
	DoorSpeaker
	Engine
	EngineBlock
	Exhaust
	Fender
	Frame
	FrontBumper
	FrontWheels
	Grille
	Hood
	Horn
	Hydraulics
	Livery
	Ornaments
	Plaques
	Plateholder
	RearBumper
	RightFender
	Roof
	Seats
	SideSkirt
	Speakers
	Spoiler
	SteeringWheel
	Struts
	Suspension
	Tank
	TireSmoke
	Transmission
	Trim
	TrimDesign
	Trunk
	Turbo
	Unk1
	Unk2
	Unk3
	Unk4
	VanityPlates
	Windows
	XenonLights
)

type VehiclePart

type VehiclePart = uint8
const (
	FrontLeft VehiclePart = iota
	FrontRight
	MiddleLeft
	MiddleRight
	RearLeft
	RearRight
)

type VehiclePartDamage

type VehiclePartDamage = uint8
const (
	PartDamagedLevel1 VehiclePartDamage = iota
	PartDamagedLevel2
	PartDamagedLevel3
	PartNotDamaged
)

type VoiceChannel

type VoiceChannel struct {
	BaseObject
}

func CreateVoiceChannel

func CreateVoiceChannel(spatial bool, maxDistance float32) *VoiceChannel

func NewVoiceChannel

func NewVoiceChannel(v unsafe.Pointer) *VoiceChannel

func (VoiceChannel) AddPlayer

func (v VoiceChannel) AddPlayer(player *Player)

func (VoiceChannel) HasPlayer

func (v VoiceChannel) HasPlayer(player *Player) bool

func (VoiceChannel) IsPlayerMuted

func (v VoiceChannel) IsPlayerMuted(player *Player) bool

func (VoiceChannel) IsSpatial

func (v VoiceChannel) IsSpatial() bool

func (VoiceChannel) MaxDistance

func (v VoiceChannel) MaxDistance() float32

func (VoiceChannel) MutePlayer

func (v VoiceChannel) MutePlayer(player *Player)

func (VoiceChannel) RemovePlayer

func (v VoiceChannel) RemovePlayer(player *Player)

func (VoiceChannel) UnmutePlayer

func (v VoiceChannel) UnmutePlayer(player *Player)

type WindowTint

type WindowTint = uint8
const (
	TintDarkSmoke WindowTint = iota
	TintGreen
	TintLightSmoke
	TintLimo
	TintNone
	TintPureBlack
	TintStock
)

type World

type World interface {
	Position() *Vector3
	SetPosition()
	Dimension() int32
	SetDimension()
}

type WorldObject

type WorldObject struct {
	BaseObject
}

func (WorldObject) Dimension

func (w WorldObject) Dimension() int32

func (WorldObject) Position

func (w WorldObject) Position() Vector3

func (WorldObject) SetDimension

func (w WorldObject) SetDimension(dimension int32)

func (WorldObject) SetPosition

func (w WorldObject) SetPosition(pos Vector3)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL