Documentation
¶
Index ¶
- Constants
- Variables
- func AddCharModel(baseID, newID int, dff, txd string) error
- func AddSimpleModel(vw, baseID, newID int, dff, txd string) error
- func AddSimpleModelTimed(vw, baseID, newID int, dff, txd string, timeOn, timeOff int) error
- func AllowAdminTeleport()
- func AreAllAnimationsEnabled() bool
- func AreInteriorEnterExitsEnabled() bool
- func AreInteriorWeaponsAllowed() bool
- func ArePlayerPedAnimsEnabled() bool
- func AreZoneNamesEnabled() bool
- func ConfigOption[T ConfigOptionValue](key string) T
- func ConnectNPC(name string, script string)
- func DisableAllAnimations()
- func DisableChatInputFilter()
- func DisableInteriorEnterExits()
- func DisableManualEngineAndLights()
- func DisableNametagLOS()
- func DisableNametags()
- func DisableObjectsCameraCollision()
- func DisablePlayerPedAnims()
- func DisablePlayerTurfCheck(turf *PlayerTurf)
- func DisableTurfCheck(turf *Turf)
- func DisableVehicleFriendlyFire()
- func DisableZoneNames()
- func DisallowAdminTeleport()
- func EnableAllAnimations()
- func EnableChatInputFilter()
- func EnableInteriorEnterExits()
- func EnableManualEngineAndLights()
- func EnableNametagLOS()
- func EnableNametags()
- func EnableObjectsCameraCollision()
- func EnablePlayerPedAnims()
- func EnablePlayerTurfCheck(turf *PlayerTurf)
- func EnableStuntBonuses()
- func EnableTurfCheck(turf *Turf)
- func EnableVehicleFriendlyFire()
- func EnableZoneNames()
- func FreeActor(actor *Actor)
- func FreeClass(cls *Class)
- func FreeMenu(menu *Menu)
- func FreeObject(obj *Object)
- func FreePickup(pickup *Pickup)
- func FreePlayerObject(obj *PlayerObject)
- func FreePlayerPickup(pickup *PlayerPickup)
- func FreePlayerTextLabel(tl *PlayerTextLabel)
- func FreePlayerTextdraw(td *PlayerTextdraw)
- func FreePlayerTurf(turf *PlayerTurf)
- func FreeTextLabel(tl *TextLabel)
- func FreeTextdraw(td *Textdraw)
- func FreeTurf(turf *Turf)
- func FreeVehicle(veh *Vehicle)
- func IsAdminTeleportAllowed() bool
- func IsChatInputFilterEnabled() bool
- func IsIPBanned(IP string) bool
- func IsManualEngineAndLightsEnabled() bool
- func IsNametagLOSEnabled() bool
- func IsNametagsEnabled() bool
- func IsValidModel(modelID int) bool
- func IsVehicleFriendlyFireEnabled() bool
- func LimitGlobalChatRadius(radius float64)
- func LimitPlayerMarkerRadius(radius float64)
- func Listen(_type EventType, listener Listener)
- func ListenFunc(_type EventType, listener func(context.Context, Event) error)
- func Log(level LogLevel, format string, a ...any)
- func MaxPlayers() int
- func ModelNameFromCRC(crc int) string
- func ModelPath(modelID int) (modelPath, error)
- func PlayerMarkerMode() int
- func Println(format string, a ...any)
- func SendDeathMessage(killer *Player, killee *Player, weapon int)
- func SendRCONCommand(command string)
- func SetConfigOption[T ConfigOptionValue](key string, value T)
- func SetEventListener(listener Listener)
- func SetGameModeText(text string)
- func SetLanguage(language string)
- func SetMapName(name string)
- func SetNametagDrawRadius(radius float64)
- func SetPlayerMarkerMode(mode int)
- func SetServerName(name string)
- func SetURL(url string)
- func SetWeather(weather int)
- func SetWorldTime(hours int)
- func ShowGameTextForAll(msg string, delay time.Duration, style int)
- func UsedVehicleModelCount() int
- func VehicleCountByModel(model VehicleModel) int
- func Weather() int
- func WorldTime() int
- type Actor
- func (a *Actor) Animation() Animation
- func (a *Actor) ApplyAnimation(anim Animation)
- func (a *Actor) ClearAnimations()
- func (a *Actor) FacingAngle() float32
- func (a *Actor) Health() float32
- func (a *Actor) IsInvulnerable() bool
- func (a *Actor) IsStreamedInFor(plr *Player) bool
- func (a *Actor) MakeInvulnerable()
- func (a *Actor) Position() Vector3
- func (a *Actor) SetFacingAngle(angle float32)
- func (a *Actor) SetHealth(health float32)
- func (a *Actor) SetPosition(pos Vector3)
- func (a *Actor) SetSkin(skin int)
- func (a *Actor) SetVirtualWorld(vw int)
- func (a *Actor) Skin() int
- func (a *Actor) SpawnData() ActorSpawnData
- func (a *Actor) UnmakeInvulnerable()
- func (a *Actor) VirtualWorld() int
- type ActorSpawnData
- type ActorStreamInEvent
- type ActorStreamOutEvent
- type Animation
- type BodyPart
- type Class
- func (c *Class) Ammo1() int
- func (c *Class) Ammo2() int
- func (c *Class) Ammo3() int
- func (c *Class) Angle() float32
- func (c *Class) ID() int
- func (c *Class) SetAmmo1(ammo1 int)
- func (c *Class) SetAmmo2(ammo2 int)
- func (c *Class) SetAmmo3(ammo3 int)
- func (c *Class) SetAngle(angle float32)
- func (c *Class) SetSkin(skin int)
- func (c *Class) SetSpawnPosition(pos Vector3)
- func (c *Class) SetTeam(team int)
- func (c *Class) SetWeapon1(weapon1 Weapon)
- func (c *Class) SetWeapon2(weapon2 Weapon)
- func (c *Class) SetWeapon3(weapon3 Weapon)
- func (c *Class) Skin() int
- func (c *Class) SpawnPosition() Vector3
- func (c *Class) Team() int
- func (c *Class) Weapon1() Weapon
- func (c *Class) Weapon2() Weapon
- func (c *Class) Weapon3() Weapon
- type ClientCheckResponseEvent
- type ConfigOptionValue
- type ConsoleTextEvent
- type DefaultCheckpoint
- func (c *DefaultCheckpoint) Disable()
- func (c *DefaultCheckpoint) Enable()
- func (c *DefaultCheckpoint) IsEnabled() bool
- func (c *DefaultCheckpoint) IsPlayerInside() bool
- func (c *DefaultCheckpoint) Position() Vector3
- func (c *DefaultCheckpoint) Radius() float32
- func (c *DefaultCheckpoint) SetPosition(pos Vector3)
- func (c *DefaultCheckpoint) SetRadius(radius float32)
- type DialogResponse
- type DisconnectReason
- type Dispatcher
- func (d *Dispatcher) HandleEvent(ctx context.Context, e Event) error
- func (d *Dispatcher) HasListener(_type EventType) bool
- func (d *Dispatcher) Listen(_type EventType, listener Listener)
- func (d *Dispatcher) ListenFunc(_type EventType, listener func(context.Context, Event) error)
- func (d *Dispatcher) Subscribe(subscriber Subscriber)
- func (d *Dispatcher) SubscribeFunc(subscriber func() any)
- type EnterExitModShopEvent
- type Event
- type EventType
- type IncomingConnectionEvent
- type InputDialog
- type InputDialogResponseEvent
- type ListDialog
- type ListDialogResponseEvent
- type Listener
- type ListenerFunc
- type LogLevel
- type Menu
- func (m *Menu) AddItem(column int, text string)
- func (m *Menu) ColumnCount() int
- func (m *Menu) ColumnHeader(column int) string
- func (m *Menu) ColumnWidths() Vector2
- func (m *Menu) Disable()
- func (m *Menu) DisableRow(row int)
- func (m *Menu) HideFor(plr *Player)
- func (m *Menu) IsEnabled() bool
- func (m *Menu) IsRowEnabled(row int) bool
- func (m *Menu) Item(column, row int) string
- func (m *Menu) Position() Vector2
- func (m *Menu) RowCount(column int) int
- func (m *Menu) SetColumnHeader(column int, header string)
- func (m *Menu) ShowFor(plr *Player)
- type MessageDialog
- type MessageDialogResponseEvent
- type NPC
- func (n *NPC) AimAtPlayer(player *Player, shoot bool, shootDelay int, updateAngle bool)
- func (n *NPC) Armour() float32
- func (n *NPC) FacingAngle() float32
- func (n *NPC) Health() float32
- func (n *NPC) ID() int
- func (n *NPC) Interior() int
- func (n *NPC) IsDead() bool
- func (n *NPC) IsInvulnerable() bool
- func (n *NPC) IsMoving() bool
- func (n *NPC) IsPlayingPlayback() bool
- func (n *NPC) IsStreamedInFor(player *Player) bool
- func (n *NPC) IsValid() bool
- func (n *NPC) Keys() NPCKeyData
- func (n *NPC) MoveToPlayer(player *Player, moveType NPCMoveType, speed float32, stopRange float32, ...)
- func (n *NPC) PausePlayback()
- func (n *NPC) Position() Vector3
- func (n *NPC) PutInVehicle(vehicle *Vehicle, seat int)
- func (n *NPC) Release()
- func (n *NPC) RemoveFromVehicle()
- func (n *NPC) Respawn()
- func (n *NPC) ResumePlayback()
- func (n *NPC) Rotation() Vector3
- func (n *NPC) SetAmmo(ammo int)
- func (n *NPC) SetArmour(armour float32)
- func (n *NPC) SetFacingAngle(angle float32)
- func (n *NPC) SetHealth(health float32)
- func (n *NPC) SetInterior(interior int)
- func (n *NPC) SetInvulnerable(invuln bool)
- func (n *NPC) SetKeys(upDown, leftRight, keys uint16)
- func (n *NPC) SetPosition(pos Vector3)
- func (n *NPC) SetRotation(rot Vector3)
- func (n *NPC) SetSkin(skin int)
- func (n *NPC) SetVirtualWorld(vw int)
- func (n *NPC) SetWeapon(weapon Weapon)
- func (n *NPC) SetWeaponAccuracy(weapon Weapon, accuracy float32)
- func (n *NPC) SetWeaponSkillLevel(skill PlayerWeaponSkill, level int)
- func (n *NPC) Spawn()
- func (n *NPC) StartPlayback(recordName string, autoUnload bool, startPos Vector3, startRot Vector3)
- func (n *NPC) StopAim()
- func (n *NPC) StopMove()
- func (n *NPC) StopPlayback()
- func (n *NPC) Vehicle() (*Vehicle, error)
- func (n *NPC) VehicleSeat() int
- func (n *NPC) VirtualWorld() int
- func (n *NPC) Weapon() Weapon
- type NPCKeyData
- type NPCMoveType
- type Object
- func (o *Object) AttachToPlayer(plr *Player, offset Vector3, rot Vector3)
- func (o *Object) AttachToVehicle(veh *Vehicle, offset Vector3, rot Vector3)
- func (o *Object) DisableCameraCollision()
- func (o *Object) DrawDistance() float32
- func (o *Object) EnableCameraCollision()
- func (o *Object) IsCameraCollisionEnabled() bool
- func (o *Object) IsMaterialSlotUsed(slotIdx int) bool
- func (o *Object) IsMoving() bool
- func (o *Object) Material(slotIdx int) (ObjectMaterial, error)
- func (o *Object) MaterialText(slotIdx int) (ObjectMaterialText, error)
- func (o *Object) Model() int
- func (o *Object) Move(pos Vector3, rot Vector3, speed float32) time.Duration
- func (o *Object) MovingData() ObjectMoveData
- func (o *Object) Position() Vector3
- func (o *Object) ResetAttachment()
- func (o *Object) Rotation() Vector3
- func (o *Object) SetDrawDistance(drawDist float32)
- func (o *Object) SetMaterial(idx, model int, textureLib, textureName string, color int)
- func (o *Object) SetMaterialText(slotIdx int, text string, size ObjectMaterialSize, fontFace string, ...)
- func (o *Object) SetModel(model int)
- func (o *Object) SetPosition(pos Vector3)
- func (o *Object) SetRotation(rot Vector3)
- func (o *Object) Stop()
- type ObjectAttachmentData
- type ObjectAttachmentTarget
- type ObjectEditResponse
- type ObjectEditedEvent
- type ObjectMaterial
- type ObjectMaterialSize
- type ObjectMaterialText
- type ObjectMaterialTextAlign
- type ObjectMoveData
- type ObjectMovedEvent
- type ObjectSelectedEvent
- type Pickup
- func (p *Pickup) HideFor(plr *Player)
- func (p *Pickup) ID() int
- func (p *Pickup) IsHiddenFor(plr *Player) bool
- func (p *Pickup) IsStreamedInFor(plr *Player) bool
- func (p *Pickup) Model() int
- func (p *Pickup) Position() Vector3
- func (p *Pickup) SetModel(model int)
- func (p *Pickup) SetPosition(pos Vector3)
- func (p *Pickup) SetType(_type PickupType)
- func (p *Pickup) SetVirtualWorld(vw int)
- func (p *Pickup) ShowFor(plr *Player)
- func (p *Pickup) Type() PickupType
- func (p *Pickup) VirtualWorld() int
- type PickupType
- type Player
- func (p *Player) Action() PlayerSpecialAction
- func (p *Player) AimZ() float32
- func (p *Player) AllowTeleport()
- func (p *Player) AllowWeapons()
- func (p *Player) AnimationFlags() int
- func (p *Player) AnimationIndex() int
- func (p *Player) ApplyAnimation(anim Animation, syncType PlayerAnimationSyncType)
- func (p *Player) AreWeaponsAllowed() bool
- func (p *Player) ArmedWeapon() Weapon
- func (p *Player) ArmedWeaponAmmo() int
- func (p *Player) Armor() float32
- func (p *Player) AttachCameraToObject(obj *Object)
- func (p *Player) Attachment(slotIdx int) PlayerAttachment
- func (p *Player) Ban(reason string)
- func (p *Player) BeginObjectEditing(obj *Object)
- func (p *Player) BeginObjectSelecting()
- func (p *Player) CameraAspectRatio() float32
- func (p *Player) CameraFrontVector() Vector3
- func (p *Player) CameraLookAt() Vector3
- func (p *Player) CameraMode() int
- func (p *Player) CameraPosition() Vector3
- func (p *Player) CameraTargetActor() *Actor
- func (p *Player) CameraTargetObject() *Object
- func (p *Player) CameraTargetPlayer() *Player
- func (p *Player) CameraTargetVehicle() *Vehicle
- func (p *Player) CameraZoom() float32
- func (p *Player) ClearAnimations(syncType PlayerAnimationSyncType)
- func (p *Player) ClientVersion() int
- func (p *Player) ClientVersionName() string
- func (p *Player) Color() uint
- func (p *Player) ColorFor(other *Player) (uint, error)
- func (p *Player) CreateExplosion(_type int, radius float32, pos Vector3)
- func (p *Player) CustomSkin() int
- func (p *Player) DefaultCheckpoint() *DefaultCheckpoint
- func (p *Player) Dialog() (dialog, error)
- func (p *Player) DialogData()
- func (p *Player) DialogID()
- func (p *Player) DisableCameraTargeting()
- func (p *Player) DisableGhostMode()
- func (p *Player) DisableRemoteVehicleCollisions()
- func (p *Player) DisableSpectating()
- func (p *Player) DisableStuntBonuses()
- func (p *Player) DisableWidescreen()
- func (p *Player) DisallowTeleport()
- func (p *Player) DisallowWeapons()
- func (p *Player) DistanceFrom(point Vector3) float32
- func (p *Player) DrunkLevel() int
- func (p *Player) EditAttachment(slotIdx int)
- func (p *Player) EnableCameraTargeting()
- func (p *Player) EnableGhostMode()
- func (p *Player) EnableRemoteVehicleCollisions()
- func (p *Player) EnableSpectating()
- func (p *Player) EnableStuntBonuses()
- func (p *Player) EnableWidescreen()
- func (p *Player) EndObjectEditing()
- func (p *Player) FacingAngle() float32
- func (p *Player) FightingStyle() PlayerFightingStyle
- func (p *Player) ForceClassSelection()
- func (p *Player) Freeze()
- func (p *Player) GameText(style int) *PlayerGameText
- func (p *Player) GiveMoney(money int)
- func (p *Player) GiveWeapon(weapon Weapon, ammo int)
- func (p *Player) Gravity() float32
- func (p *Player) HasAttachment(slotIdx int) bool
- func (p *Player) Health() float32
- func (p *Player) HideClock()
- func (p *Player) HideGameText(style int)
- func (p *Player) HideNameTagFor(other *Player)
- func (p *Player) ID() int
- func (p *Player) IP() string
- func (p *Player) Interior() int
- func (p *Player) InterpolateCameraLookAt(from Vector3, to Vector3, time int, cutType PlayerCameraCutType)
- func (p *Player) InterpolateCameraPosition(from Vector3, to Vector3, time int, cutType PlayerCameraCutType)
- func (p *Player) IsAdmin() bool
- func (p *Player) IsBot() bool
- func (p *Player) IsCameraTargetingEnabled() bool
- func (p *Player) IsClockShown() bool
- func (p *Player) IsEditingObject() bool
- func (p *Player) IsFrozen() bool
- func (p *Player) IsGameTextShown(style int)
- func (p *Player) IsGhostModeEnabled() bool
- func (p *Player) IsInRangeOf(point Vector3, _range float32) bool
- func (p *Player) IsSelectingObject() bool
- func (p *Player) IsSpawned() bool
- func (p *Player) IsStreamedInFor(other *Player) bool
- func (p *Player) IsTeleportAllowed() bool
- func (p *Player) IsUsingOfficialClient() bool
- func (p *Player) IsWidescreenEnabled() bool
- func (p *Player) KeyData() PlayerKeyData
- func (p *Player) Kick()
- func (p *Player) LastPlayedAudio() string
- func (p *Player) LastPlayedSound() int
- func (p *Player) MakeAdmin()
- func (p *Player) Menu(target *Player)
- func (p *Player) Money() int
- func (p *Player) Name() string
- func (p *Player) NetworkStats()
- func (p *Player) Ping() int
- func (p *Player) PlayAudio(url string, usePos bool, pos Vector3, distance float32)
- func (p *Player) PlayCrimeReport(suspect *Player, crime int)
- func (p *Player) PlaySound(sound int, pos Vector3)
- func (p *Player) Position() Vector3
- func (p *Player) RaceCheckpoint() *RaceCheckpoint
- func (p *Player) RawIP() int
- func (p *Player) RedirectDownload(url string) error
- func (p *Player) RemoveAttachment(slotIdx int)
- func (p *Player) RemoveDefaultObjects(model int, radius float32, pos Vector3)
- func (p *Player) RemoveFromVehicle(force bool)
- func (p *Player) RemoveWeapon(weapon Weapon)
- func (p *Player) RemovedBuildingCount() int
- func (p *Player) ResetMoney()
- func (p *Player) ResetWeapons()
- func (p *Player) Rotation() Vector4
- func (p *Player) Score() int
- func (p *Player) SendClientCheck(actionType, address, offset, count int)
- func (p *Player) SendClientMessage(msg string, color uint)
- func (p *Player) SendDeathMessage(killer *Player, killee *Player, weapon int)
- func (p *Player) SendEmptyDeathMessage()
- func (p *Player) SendMessageFrom(sender *Player, msg string)
- func (p *Player) Serial() string
- func (p *Player) SetAction(action PlayerSpecialAction)
- func (p *Player) SetArmedWeapon(weapon Weapon)
- func (p *Player) SetArmor(armor float32)
- func (p *Player) SetAttachment(slotIdx int, attachment PlayerAttachment)
- func (p *Player) SetCameraBehind()
- func (p *Player) SetCameraLookAt(pos Vector3, cutType PlayerCameraCutType)
- func (p *Player) SetCameraPosition(pos Vector3)
- func (p *Player) SetChatBubble(text string, color uint, drawDist float32, expire time.Duration)
- func (p *Player) SetColor(color uint)
- func (p *Player) SetColorFor(other *Player, color uint)
- func (p *Player) SetDrunkLevel(level int)
- func (p *Player) SetFacingAngle(angle float32)
- func (p *Player) SetFightingStyle(style PlayerFightingStyle)
- func (p *Player) SetGravity(gravity float32)
- func (p *Player) SetHealth(health float32)
- func (p *Player) SetInterior(interior int)
- func (p *Player) SetMapIcon(ID int, _type int, color uint, style int, pos Vector3)
- func (p *Player) SetMoney(money int)
- func (p *Player) SetName(name string) PlayerNameStatus
- func (p *Player) SetPosition(pos Vector3)
- func (p *Player) SetPositionFindZ(pos Vector3)
- func (p *Player) SetScore(score int)
- func (p *Player) SetShopName(name string)
- func (p *Player) SetSkillLevel(skill PlayerWeaponSkill, level int)
- func (p *Player) SetSkin(skin int)
- func (p *Player) SetTeam(team int)
- func (p *Player) SetTime(time PlayerTime)
- func (p *Player) SetVelocity(velocity Vector3)
- func (p *Player) SetVirtualWorld(vw int)
- func (p *Player) SetWantedLevel(level int)
- func (p *Player) SetWeaponAmmo(weapon Weapon, ammo int)
- func (p *Player) SetWeather(weather int)
- func (p *Player) SetWorldBounds(bounds Vector4)
- func (p *Player) SetWorldTime(time int)
- func (p *Player) ShopName() string
- func (p *Player) ShowClock()
- func (p *Player) ShowGameText(msg string, delay time.Duration, style int)
- func (p *Player) ShowNameTagFor(other *Player)
- func (p *Player) Skin() int
- func (p *Player) Spawn()
- func (p *Player) SpectatePlayer(player *Player, mode PlayerSpectateMode)
- func (p *Player) SpectateVehicle(vehicle *Vehicle, mode PlayerSpectateMode)
- func (p *Player) SpectatingPlayer() (*Player, error)
- func (p *Player) SpectatingVehicle() (*Vehicle, error)
- func (p *Player) State() PlayerState
- func (p *Player) StopAudio()
- func (p *Player) TargetActor() *Actor
- func (p *Player) TargetPlayer() *Player
- func (p *Player) Team() int
- func (p *Player) Time() PlayerTime
- func (p *Player) Unfreeze()
- func (p *Player) UnmakeAdmin()
- func (p *Player) UnsetMapIcon(ID int)
- func (p *Player) UnsetWorldBounds()
- func (p *Player) Vehicle() (*Vehicle, error)
- func (p *Player) VehicleSeat() int
- func (p *Player) Velocity() Vector3
- func (p *Player) VirtualWorld() int
- func (p *Player) WantedLevel() int
- func (p *Player) WeaponSlot(slotIdx WeaponSlotIndex) (WeaponSlot, error)
- func (p *Player) WeaponSlots() []*WeaponSlot
- func (p *Player) WeaponState() PlayerWeaponState
- func (p *Player) Weather() int
- func (p *Player) WorldBounds() Vector4
- type PlayerAnimationSyncType
- type PlayerAttachment
- type PlayerAttachmentEdited
- type PlayerBone
- type PlayerBullet
- type PlayerBulletHitType
- type PlayerCameraCutType
- type PlayerCancelPlayerTextDrawSelectionEvent
- type PlayerCancelTextDrawSelectionEvent
- type PlayerClickMapEvent
- type PlayerClickPlayerEvent
- type PlayerClickPlayerTextDrawEvent
- type PlayerClickPlayerTurfEvent
- type PlayerClickSource
- type PlayerClickTextDrawEvent
- type PlayerClickTurfEvent
- type PlayerClientInitEvent
- type PlayerCommandTextEvent
- type PlayerConnectEvent
- type PlayerDeathEvent
- type PlayerDisconnectEvent
- type PlayerEnterCheckpointEvent
- type PlayerEnterPlayerTurfEvent
- type PlayerEnterRaceCheckpointEvent
- type PlayerEnterTurfEvent
- type PlayerEnterVehicleEvent
- type PlayerExitVehicleEvent
- type PlayerExitedMenuEvent
- type PlayerFightingStyle
- type PlayerFinishedDownloadingEvent
- type PlayerGameText
- type PlayerGiveDamageActorEvent
- type PlayerGiveDamageEvent
- type PlayerInteriorChangeEvent
- type PlayerKeyData
- type PlayerKeyStateChangeEvent
- type PlayerLeaveCheckpointEvent
- type PlayerLeavePlayerTurfEvent
- type PlayerLeaveRaceCheckpointEvent
- type PlayerLeaveTurfEvent
- type PlayerNameChangeEvent
- type PlayerNameStatus
- type PlayerObject
- func (o *PlayerObject) AttachToPlayer(plr *Player, offset Vector3, rot Vector3)
- func (o *PlayerObject) AttachToVehicle(veh *Vehicle, offset Vector3, rot Vector3)
- func (o *PlayerObject) DisableCameraCollision()
- func (o *PlayerObject) DrawDistance() float32
- func (o *PlayerObject) EnableCameraCollision()
- func (o *PlayerObject) IsCameraCollisionEnabled() bool
- func (o *PlayerObject) IsMaterialSlotUsed(slotIdx int) bool
- func (o *PlayerObject) IsMoving() bool
- func (o *PlayerObject) Material(slotIdx int) (ObjectMaterial, error)
- func (o *PlayerObject) MaterialText(slotIdx int) (ObjectMaterialText, error)
- func (o *PlayerObject) Model() int
- func (o *PlayerObject) Move(pos Vector3, rot Vector3, speed float32) time.Duration
- func (o *PlayerObject) MovingData() ObjectMoveData
- func (o *PlayerObject) Player() *Player
- func (o *PlayerObject) Position() Vector3
- func (o *PlayerObject) ResetAttachment()
- func (o *PlayerObject) Rotation() Vector3
- func (o *PlayerObject) SetDrawDistance(drawDist float32)
- func (o *PlayerObject) SetMaterial(idx, model int, textureLib, textureName string, color int)
- func (o *PlayerObject) SetMaterialText(slotIdx int, text string, size ObjectMaterialSize, fontFace string, ...)
- func (o *PlayerObject) SetModel(model int)
- func (o *PlayerObject) SetPosition(pos Vector3)
- func (o *PlayerObject) SetRotation(rot Vector3)
- func (o *PlayerObject) Stop()
- type PlayerObjectEditedEvent
- type PlayerObjectMovedEvent
- type PlayerObjectSelectedEvent
- type PlayerPickUpPickupEvent
- type PlayerPickUpPlayerPickupEvent
- type PlayerPickup
- func (p *PlayerPickup) Hide()
- func (p *PlayerPickup) ID() int
- func (p *PlayerPickup) IsHidden() bool
- func (p *PlayerPickup) IsStreamedIn() bool
- func (p *PlayerPickup) Model() int
- func (p *PlayerPickup) Player() *Player
- func (p *PlayerPickup) Position() Vector3
- func (p *PlayerPickup) SetModel(model int)
- func (p *PlayerPickup) SetPosition(pos Vector3)
- func (p *PlayerPickup) SetType(_type PickupType)
- func (p *PlayerPickup) SetVirtualWorld(vw int)
- func (p *PlayerPickup) Show()
- func (p *PlayerPickup) Type() PickupType
- func (p *PlayerPickup) VirtualWorld() int
- type PlayerRequestClassEvent
- type PlayerRequestDownloadEvent
- type PlayerRequestSpawnEvent
- type PlayerScoreChangeEvent
- type PlayerSelectedMenuRowEvent
- type PlayerShotMissedEvent
- type PlayerShotObjectEvent
- type PlayerShotPlayerEvent
- type PlayerShotPlayerObjectEvent
- type PlayerShotVehicleEvent
- type PlayerSpawnEvent
- type PlayerSpecialAction
- type PlayerSpectateMode
- type PlayerState
- type PlayerStateChangeEvent
- type PlayerStreamInEvent
- type PlayerStreamOutEvent
- type PlayerTakeDamageEvent
- type PlayerTextEvent
- type PlayerTextLabel
- func (tl *PlayerTextLabel) AttachToPlayer(plr *Player, offset Vector3)
- func (tl *PlayerTextLabel) AttachToVehicle(veh *Vehicle, offset Vector3)
- func (tl *PlayerTextLabel) Color() uint
- func (tl *PlayerTextLabel) DetachFromPlayer(pos Vector3)
- func (tl *PlayerTextLabel) DetachFromVehicle(pos Vector3)
- func (tl *PlayerTextLabel) DisableLOSTest()
- func (tl *PlayerTextLabel) DrawDistance() float32
- func (tl *PlayerTextLabel) EnableLOSTest()
- func (tl *PlayerTextLabel) IsLOSTestEnabled() bool
- func (tl *PlayerTextLabel) Player() *Player
- func (tl *PlayerTextLabel) Position() Vector3
- func (tl *PlayerTextLabel) SetColor(clr uint)
- func (tl *PlayerTextLabel) SetDrawDistance(drawDist float32)
- func (tl *PlayerTextLabel) SetPosition(pos Vector3)
- func (tl *PlayerTextLabel) SetText(text string)
- func (tl *PlayerTextLabel) SetVirtualWorld(vw int)
- func (tl *PlayerTextLabel) Text() string
- func (tl *PlayerTextLabel) VirtualWorld() int
- type PlayerTextdraw
- func (td *PlayerTextdraw) Alignment() TextDrawAlignment
- func (td *PlayerTextdraw) BackgroundColor() uint
- func (td *PlayerTextdraw) BoxColor() uint
- func (td *PlayerTextdraw) Color() uint
- func (td *PlayerTextdraw) DisableBox()
- func (td *PlayerTextdraw) DisableProportionality()
- func (td *PlayerTextdraw) DisableSelection()
- func (td *PlayerTextdraw) EnableBox()
- func (td *PlayerTextdraw) EnableProportionality()
- func (td *PlayerTextdraw) EnableSelection()
- func (td *PlayerTextdraw) Hide()
- func (td *PlayerTextdraw) ID() int
- func (td *PlayerTextdraw) IsBoxEnabled() bool
- func (td *PlayerTextdraw) IsProportional() bool
- func (td *PlayerTextdraw) IsSelectable() bool
- func (td *PlayerTextdraw) IsShown() bool
- func (td *PlayerTextdraw) LetterSize() Vector2
- func (td *PlayerTextdraw) Outline() int
- func (td *PlayerTextdraw) Player() *Player
- func (td *PlayerTextdraw) Position() Vector2
- func (td *PlayerTextdraw) PreviewModel() int
- func (td *PlayerTextdraw) PreviewRotation() Vector3
- func (td *PlayerTextdraw) PreviewVehicleColor() VehicleColor
- func (td *PlayerTextdraw) PreviewZoom() float32
- func (td *PlayerTextdraw) SetAlignment(alignment TextDrawAlignment)
- func (td *PlayerTextdraw) SetBackgroundColor(color uint)
- func (td *PlayerTextdraw) SetBoxColor(color uint)
- func (td *PlayerTextdraw) SetColor(color uint)
- func (td *PlayerTextdraw) SetLetterSize(size Vector2)
- func (td *PlayerTextdraw) SetOutline(outline int)
- func (td *PlayerTextdraw) SetPosition(pos Vector2)
- func (td *PlayerTextdraw) SetPreviewModel(model int)
- func (td *PlayerTextdraw) SetPreviewRotation(rot Vector3)
- func (td *PlayerTextdraw) SetPreviewVehicleColor(color VehicleColor)
- func (td *PlayerTextdraw) SetPreviewZoom(zoom float32)
- func (td *PlayerTextdraw) SetShadow(shadow int)
- func (td *PlayerTextdraw) SetStyle(style TextdrawStyle)
- func (td *PlayerTextdraw) SetText(text string)
- func (td *PlayerTextdraw) SetTextSize(size Vector2)
- func (td *PlayerTextdraw) Shadow() int
- func (td *PlayerTextdraw) Show()
- func (td *PlayerTextdraw) Style() TextdrawStyle
- func (td *PlayerTextdraw) Text() string
- func (td *PlayerTextdraw) TextSize() Vector2
- type PlayerTime
- type PlayerTurf
- func (t *PlayerTurf) Color() uint
- func (t *PlayerTurf) Flash(clr uint)
- func (t *PlayerTurf) FlashingColor() uint
- func (t *PlayerTurf) Hide()
- func (t *PlayerTurf) IsFlashing() bool
- func (t *PlayerTurf) IsPlayerInside() bool
- func (t *PlayerTurf) IsShown() bool
- func (t *PlayerTurf) Player() *Player
- func (t *PlayerTurf) Position() TurfPosition
- func (t *PlayerTurf) SetPosition(pos TurfPosition)
- func (t *PlayerTurf) Show(clr uint)
- func (t *PlayerTurf) StopFlash()
- type PlayerUpdateEvent
- type PlayerWeaponSkill
- type PlayerWeaponState
- type RaceCheckpoint
- func (c *RaceCheckpoint) Disable()
- func (c *RaceCheckpoint) Enable()
- func (c *RaceCheckpoint) IsEnabled() bool
- func (c *RaceCheckpoint) IsPlayerInside() bool
- func (c *RaceCheckpoint) NextPosition() Vector3
- func (c *RaceCheckpoint) Position() Vector3
- func (c *RaceCheckpoint) Radius() float32
- func (c *RaceCheckpoint) SetNextPosition(pos Vector3)
- func (c *RaceCheckpoint) SetPosition(pos Vector3)
- func (c *RaceCheckpoint) SetRadius(radius float32)
- func (c *RaceCheckpoint) SetType(_type RaceCheckpointType)
- func (c *RaceCheckpoint) Type() RaceCheckpointType
- type RaceCheckpointType
- type RconLoginAttemptEvent
- type Subscriber
- type SubscriberFunc
- type TabListDialog
- type TabListDialogResponseEvent
- type TabListItem
- type TextDrawAlignment
- type TextLabel
- func (tl *TextLabel) AttachToPlayer(plr *Player, offset Vector3)
- func (tl *TextLabel) AttachToVehicle(veh *Vehicle, offset Vector3)
- func (tl *TextLabel) Color() uint
- func (tl *TextLabel) DetachFromPlayer(pos Vector3)
- func (tl *TextLabel) DetachFromVehicle(pos Vector3)
- func (tl *TextLabel) DisableLOSTest()
- func (tl *TextLabel) DrawDistance() float32
- func (tl *TextLabel) EnableLOSTest()
- func (tl *TextLabel) IsLOSTestEnabled() bool
- func (tl *TextLabel) IsStreamedInFor(plr *Player) bool
- func (tl *TextLabel) Position() Vector3
- func (tl *TextLabel) SetColor(clr uint)
- func (tl *TextLabel) SetDrawDistance(drawDist float32)
- func (tl *TextLabel) SetPosition(pos Vector3)
- func (tl *TextLabel) SetText(text string)
- func (tl *TextLabel) SetVirtualWorld(vw int)
- func (tl *TextLabel) Text() string
- func (tl *TextLabel) VirtualWorld() int
- type TextLabelAttachmentData
- type TextLabelAttachmentTarget
- type Textdraw
- func (td *Textdraw) Alignment() TextDrawAlignment
- func (td *Textdraw) BackgroundColor() uint
- func (td *Textdraw) BoxColor() uint
- func (td *Textdraw) Color() uint
- func (td *Textdraw) DisableBox()
- func (td *Textdraw) DisableProportionality()
- func (td *Textdraw) DisableSelection()
- func (td *Textdraw) EnableBox()
- func (td *Textdraw) EnableProportionality()
- func (td *Textdraw) EnableSelection()
- func (td *Textdraw) HideFor(plr *Player)
- func (td *Textdraw) ID() int
- func (td *Textdraw) IsBoxEnabled() bool
- func (td *Textdraw) IsProportional() bool
- func (td *Textdraw) IsSelectable() bool
- func (td *Textdraw) IsShownFor(plr *Player) bool
- func (td *Textdraw) LetterSize() Vector2
- func (td *Textdraw) Outline() int
- func (td *Textdraw) Position() Vector2
- func (td *Textdraw) PreviewModel() int
- func (td *Textdraw) PreviewRotation() Vector3
- func (td *Textdraw) PreviewVehicleColor() VehicleColor
- func (td *Textdraw) PreviewZoom() float32
- func (td *Textdraw) SetAlignment(alignment TextDrawAlignment)
- func (td *Textdraw) SetBackgroundColor(color uint)
- func (td *Textdraw) SetBoxColor(color uint)
- func (td *Textdraw) SetColor(color uint)
- func (td *Textdraw) SetLetterSize(size Vector2)
- func (td *Textdraw) SetOutline(outline int)
- func (td *Textdraw) SetPosition(pos Vector2)
- func (td *Textdraw) SetPreviewModel(model int)
- func (td *Textdraw) SetPreviewRotation(rot Vector3)
- func (td *Textdraw) SetPreviewVehicleColor(color VehicleColor)
- func (td *Textdraw) SetPreviewZoom(zoom float32)
- func (td *Textdraw) SetShadow(shadow int)
- func (td *Textdraw) SetStyle(style TextdrawStyle)
- func (td *Textdraw) SetText(text string)
- func (td *Textdraw) SetTextFor(plr *Player, text string)
- func (td *Textdraw) SetTextSize(size Vector2)
- func (td *Textdraw) Shadow() int
- func (td *Textdraw) ShowFor(plr *Player)
- func (td *Textdraw) Style() TextdrawStyle
- func (td *Textdraw) Text() string
- func (td *Textdraw) TextSize() Vector2
- type TextdrawStyle
- type TrailerUpdateEvent
- type Turf
- func (t *Turf) ColorFor(plr *Player) uint
- func (t *Turf) FlashFor(plr *Player, clr uint)
- func (t *Turf) FlashForAll(clr uint)
- func (t *Turf) FlashingColorFor(plr *Player) uint
- func (t *Turf) HideFor(plr *Player)
- func (t *Turf) HideForAll()
- func (t *Turf) IsFlashingFor(plr *Player) bool
- func (t *Turf) IsPlayerInside(plr *Player) bool
- func (t *Turf) IsShownFor(plr *Player) bool
- func (t *Turf) Position() TurfPosition
- func (t *Turf) SetPosition(pos TurfPosition)
- func (t *Turf) ShowFor(plr *Player, clr uint)
- func (t *Turf) ShowForAll(clr uint)
- func (t *Turf) StopFlashFor(plr *Player)
- func (t *Turf) StopFlashForAll()
- type TurfPosition
- type UnoccupiedVehicleUpdate
- type UnoccupiedVehicleUpdateEvent
- type Vector2
- type Vector3
- type Vector4
- type Vehicle
- func (v *Vehicle) AddComponent(componentID int)
- func (v *Vehicle) AngularVelocity() Vector3
- func (v *Vehicle) AreDoorsLocked() bool
- func (v *Vehicle) AreLightsTurnedOn() bool
- func (v *Vehicle) AttachTrailer(trailer *Vehicle)
- func (v *Vehicle) Cab() *Vehicle
- func (v *Vehicle) CloseHood()
- func (v *Vehicle) CloseTrunk()
- func (v *Vehicle) Color() VehicleColor
- func (v *Vehicle) ComponentInSlot(slot int) int
- func (v *Vehicle) DamageStatus() VehicleDamageStatus
- func (v *Vehicle) DetachTrailer()
- func (v *Vehicle) DisableObjective()
- func (v *Vehicle) DisableObjectiveFor(plr *Player)
- func (v *Vehicle) DisableSiren()
- func (v *Vehicle) DistanceFrom(point Vector3) float32
- func (v *Vehicle) DoorsState() VehicleDoorsState
- func (v *Vehicle) Driver() (*Player, error)
- func (v *Vehicle) EnableObjective()
- func (v *Vehicle) EnableObjectiveFor(plr *Player)
- func (v *Vehicle) EnableSiren()
- func (v *Vehicle) HasBeenOccupied() bool
- func (v *Vehicle) Health() float32
- func (v *Vehicle) Hide()
- func (v *Vehicle) HydraThrustAngle() int
- func (v *Vehicle) Interior() int
- func (v *Vehicle) IsAlarmTurnedOn() bool
- func (v *Vehicle) IsDead() bool
- func (v *Vehicle) IsEngineStarted() bool
- func (v *Vehicle) IsHidden() bool
- func (v *Vehicle) IsHoodOpen() bool
- func (v *Vehicle) IsInRangeOf(point Vector3, _range float32) bool
- func (v *Vehicle) IsObjectiveEnabled() bool
- func (v *Vehicle) IsOccupied() bool
- func (v *Vehicle) IsRespawning() bool
- func (v *Vehicle) IsSirenEnabled() bool
- func (v *Vehicle) IsStreamedInFor(player *Player) bool
- func (v *Vehicle) IsTrailer() bool
- func (v *Vehicle) IsTrunkOpen() bool
- func (v *Vehicle) LandingGearState() int
- func (v *Vehicle) LastDriver() (*Player, error)
- func (v *Vehicle) LastOccupiedAt() time.Time
- func (v *Vehicle) LastSpawnedAt() time.Time
- func (v *Vehicle) LockDoors()
- func (v *Vehicle) LockDoorsFor(plr *Player)
- func (v *Vehicle) Matrix()
- func (v *Vehicle) Model() VehicleModel
- func (v *Vehicle) NumberPlate() string
- func (v *Vehicle) OpenHood()
- func (v *Vehicle) OpenTrunk()
- func (v *Vehicle) Paintjob() int
- func (v *Vehicle) Passengers() []*Player
- func (v *Vehicle) Position() Vector3
- func (v *Vehicle) PutPlayer(plr *Player, seatID int)
- func (v *Vehicle) RemoveComponent(componentID int)
- func (v *Vehicle) Repair()
- func (v *Vehicle) Respawn()
- func (v *Vehicle) RespawnDelay() time.Duration
- func (v *Vehicle) Rotation() Vector4
- func (v *Vehicle) SetAngularVelocity(vel Vector3)
- func (v *Vehicle) SetColor(color VehicleColor)
- func (v *Vehicle) SetDamageStatus(damageStatus VehicleDamageStatus)
- func (v *Vehicle) SetDead(dead bool)
- func (v *Vehicle) SetDoorsState(state VehicleDoorsState)
- func (v *Vehicle) SetHealth(health float32)
- func (v *Vehicle) SetInterior(interior int)
- func (v *Vehicle) SetNumberPlate(numberPlate string)
- func (v *Vehicle) SetPaintjob(paintjob int)
- func (v *Vehicle) SetPosition(pos Vector3)
- func (v *Vehicle) SetRespawnDelay(respawnDelay time.Duration)
- func (v *Vehicle) SetVelocity(vel Vector3)
- func (v *Vehicle) SetVirtualWorld(virtualWorld int)
- func (v *Vehicle) SetWindowsState(state VehicleWindowsState)
- func (v *Vehicle) SetZAngle(zAngle float32)
- func (v *Vehicle) Show()
- func (v *Vehicle) StartEngine()
- func (v *Vehicle) StopEngine()
- func (v *Vehicle) Trailer() (*Vehicle, error)
- func (v *Vehicle) TrainSpeed() float32
- func (v *Vehicle) TurnOffAlarm()
- func (v *Vehicle) TurnOffLights()
- func (v *Vehicle) TurnOnAlarm()
- func (v *Vehicle) TurnOnLights()
- func (v *Vehicle) UnlockDoors()
- func (v *Vehicle) UnlockDoorsFor(plr *Player)
- func (v *Vehicle) Velocity() Vector3
- func (v *Vehicle) VirtualWorld() int
- func (v *Vehicle) WindowsState() VehicleWindowsState
- func (v *Vehicle) ZAngle() float32
- type VehicleColor
- type VehicleDamageStatus
- type VehicleDamageStatusUpdateEvent
- type VehicleDeathEvent
- type VehicleDoorsState
- type VehicleModEvent
- type VehicleModel
- func (m VehicleModel) FrontBumperZ() float32
- func (m VehicleModel) FrontSeatPosition() Vector3
- func (m VehicleModel) FrontWheelsPosition() Vector3
- func (m VehicleModel) MiddleWheelsPosition() Vector3
- func (m VehicleModel) PetrolCapPosition() Vector3
- func (m VehicleModel) RearBumperHeight() float32
- func (m VehicleModel) RearSeatPosition() Vector3
- func (m VehicleModel) RearWheelsPosition() Vector3
- func (m VehicleModel) Size() Vector3
- type VehiclePaintJobEvent
- type VehicleResprayEvent
- type VehicleSirenStateChangeEvent
- type VehicleSpawnEvent
- type VehicleStreamInEvent
- type VehicleStreamOutEvent
- type VehicleWindowsState
- type Weapon
- type WeaponSlot
- type WeaponSlotIndex
Constants ¶
const ( PlayerMarkerModeOff = iota PlayerMarkerModeGlobal PlayerMarkerModeStreamed )
const ( ObjectEditResponseCancel = iota ObjectEditResponseFinal ObjectEditResponseUpdate )
const ( ObjectMaterialSize32x32 = 10 ObjectMaterialSize64x32 = 20 ObjectMaterialSize64x64 = 30 ObjectMaterialSize128x32 = 40 ObjectMaterialSize128x64 = 50 ObjectMaterialSize128x128 = 60 ObjectMaterialSize256x32 = 70 ObjectMaterialSize256x64 = 80 ObjectMaterialSize256x128 = 90 ObjectMaterialSize256x256 = 100 ObjectMaterialSize512x64 = 110 ObjectMaterialSize512x128 = 120 ObjectMaterialSize512x256 = 130 ObjectMaterialSize512x512 = 140 )
const ( ObjectMaterialTextAlignLeft = iota ObjectMaterialTextAlignCenter ObjectMaterialTextAlignRight )
const ( PlayerWeaponSkillPistol = iota PlayerWeaponSkillSilencedPistol PlayerWeaponSkillDesertEagle PlayerWeaponSkillShotgun PlayerWeaponSkillSawnOff PlayerWeaponSkillSPAS12 PlayerWeaponSkillUzi PlayerWeaponSkillMP5 PlayerWeaponSkillAK47 PlayerWeaponSkillM4 PlayerWeaponSkillSniper )
const ( PlayerKeyAction = 1 PlayerKeyCrouch = 2 PlayerKeyFire = 4 PlayerKeySprint = 8 PlayerKeySecondaryAttack = 16 PlayerKeyJump = 32 PlayerKeyLookRight = 64 PlayerKeyHandbrake = 128 PlayerKeyAim = 128 PlayerKeyLookLeft = 256 PlayerKeyLookBehind = 512 PlayerKeySubmission = 512 PlayerKeyWalk = 1024 PlayerKeyAnalogUp = 2048 PlayerKeyAnalogDown = 4096 PlayerKeyAnalogLeft = 8192 PlayerKeyAnalogRight = 16384 PlayerKeyYes = 65536 PlayerKeyNo = 131072 PlayerKeyCtrlBack = 262144 PlayerKeyUp = -128 PlayerKeyDown = 128 PlayerKeyLeft = -128 PlayerKeyRight = 128 )
const (
PlayerClickSourceScoreboard = iota
)
Variables ¶
var DefaultDispatcher = NewDispatcher()
Functions ¶
func AddCharModel ¶
func AddSimpleModel ¶
func AddSimpleModelTimed ¶
func AllowAdminTeleport ¶
func AllowAdminTeleport()
func AreAllAnimationsEnabled ¶
func AreAllAnimationsEnabled() bool
func AreInteriorEnterExitsEnabled ¶
func AreInteriorEnterExitsEnabled() bool
func AreInteriorWeaponsAllowed ¶
func AreInteriorWeaponsAllowed() bool
func ArePlayerPedAnimsEnabled ¶
func ArePlayerPedAnimsEnabled() bool
func AreZoneNamesEnabled ¶
func AreZoneNamesEnabled() bool
func ConfigOption ¶
func ConfigOption[T ConfigOptionValue](key string) T
func ConnectNPC ¶
func DisableAllAnimations ¶
func DisableAllAnimations()
func DisableChatInputFilter ¶
func DisableChatInputFilter()
func DisableInteriorEnterExits ¶
func DisableInteriorEnterExits()
func DisableManualEngineAndLights ¶
func DisableManualEngineAndLights()
func DisableNametagLOS ¶
func DisableNametagLOS()
func DisableNametags ¶
func DisableNametags()
func DisableObjectsCameraCollision ¶
func DisableObjectsCameraCollision()
func DisablePlayerPedAnims ¶
func DisablePlayerPedAnims()
func DisablePlayerTurfCheck ¶
func DisablePlayerTurfCheck(turf *PlayerTurf)
func DisableTurfCheck ¶
func DisableTurfCheck(turf *Turf)
func DisableVehicleFriendlyFire ¶
func DisableVehicleFriendlyFire()
func DisableZoneNames ¶
func DisableZoneNames()
func DisallowAdminTeleport ¶
func DisallowAdminTeleport()
func EnableAllAnimations ¶
func EnableAllAnimations()
func EnableChatInputFilter ¶
func EnableChatInputFilter()
func EnableInteriorEnterExits ¶
func EnableInteriorEnterExits()
func EnableManualEngineAndLights ¶
func EnableManualEngineAndLights()
func EnableNametagLOS ¶
func EnableNametagLOS()
func EnableNametags ¶
func EnableNametags()
func EnableObjectsCameraCollision ¶
func EnableObjectsCameraCollision()
func EnablePlayerPedAnims ¶
func EnablePlayerPedAnims()
func EnablePlayerTurfCheck ¶
func EnablePlayerTurfCheck(turf *PlayerTurf)
func EnableStuntBonuses ¶
func EnableStuntBonuses()
func EnableTurfCheck ¶
func EnableTurfCheck(turf *Turf)
func EnableVehicleFriendlyFire ¶
func EnableVehicleFriendlyFire()
func EnableZoneNames ¶
func EnableZoneNames()
func FreeObject ¶
func FreeObject(obj *Object)
func FreePickup ¶
func FreePickup(pickup *Pickup)
func FreePlayerObject ¶
func FreePlayerObject(obj *PlayerObject)
func FreePlayerPickup ¶
func FreePlayerPickup(pickup *PlayerPickup)
func FreePlayerTextLabel ¶
func FreePlayerTextLabel(tl *PlayerTextLabel)
func FreePlayerTextdraw ¶
func FreePlayerTextdraw(td *PlayerTextdraw)
func FreePlayerTurf ¶
func FreePlayerTurf(turf *PlayerTurf)
func FreeTextLabel ¶
func FreeTextLabel(tl *TextLabel)
func FreeTextdraw ¶
func FreeTextdraw(td *Textdraw)
func FreeVehicle ¶
func FreeVehicle(veh *Vehicle)
func IsAdminTeleportAllowed ¶
func IsAdminTeleportAllowed() bool
func IsChatInputFilterEnabled ¶
func IsChatInputFilterEnabled() bool
func IsIPBanned ¶
func IsManualEngineAndLightsEnabled ¶
func IsManualEngineAndLightsEnabled() bool
func IsNametagLOSEnabled ¶
func IsNametagLOSEnabled() bool
func IsNametagsEnabled ¶
func IsNametagsEnabled() bool
func IsValidModel ¶
func IsVehicleFriendlyFireEnabled ¶
func IsVehicleFriendlyFireEnabled() bool
func LimitGlobalChatRadius ¶
func LimitGlobalChatRadius(radius float64)
func LimitPlayerMarkerRadius ¶
func LimitPlayerMarkerRadius(radius float64)
func MaxPlayers ¶
func MaxPlayers() int
func ModelNameFromCRC ¶
func PlayerMarkerMode ¶
func PlayerMarkerMode() int
func SendDeathMessage ¶
func SendRCONCommand ¶
func SendRCONCommand(command string)
func SetConfigOption ¶
func SetConfigOption[T ConfigOptionValue](key string, value T)
func SetEventListener ¶
func SetEventListener(listener Listener)
func SetGameModeText ¶
func SetGameModeText(text string)
func SetLanguage ¶
func SetLanguage(language string)
func SetMapName ¶
func SetMapName(name string)
func SetNametagDrawRadius ¶
func SetNametagDrawRadius(radius float64)
func SetPlayerMarkerMode ¶
func SetPlayerMarkerMode(mode int)
func SetServerName ¶
func SetServerName(name string)
func SetWeather ¶
func SetWeather(weather int)
func SetWorldTime ¶
func SetWorldTime(hours int)
func UsedVehicleModelCount ¶
func UsedVehicleModelCount() int
Get the number of used vehicle models on the server.
func VehicleCountByModel ¶
func VehicleCountByModel(model VehicleModel) int
Types ¶
type Actor ¶
type Actor struct {
// contains filtered or unexported fields
}
func (*Actor) ApplyAnimation ¶
func (*Actor) ClearAnimations ¶
func (a *Actor) ClearAnimations()
func (*Actor) FacingAngle ¶
func (*Actor) IsInvulnerable ¶
func (*Actor) IsStreamedInFor ¶
func (*Actor) MakeInvulnerable ¶
func (a *Actor) MakeInvulnerable()
func (*Actor) SetFacingAngle ¶
func (*Actor) SetPosition ¶
func (*Actor) SetVirtualWorld ¶
func (*Actor) SpawnData ¶
func (a *Actor) SpawnData() ActorSpawnData
func (*Actor) UnmakeInvulnerable ¶
func (a *Actor) UnmakeInvulnerable()
func (*Actor) VirtualWorld ¶
type ActorSpawnData ¶
type ActorStreamInEvent ¶
type ActorStreamOutEvent ¶
type Class ¶
type Class struct {
// contains filtered or unexported fields
}
func (*Class) SetSpawnPosition ¶
func (*Class) SetWeapon1 ¶
func (*Class) SetWeapon2 ¶
func (*Class) SetWeapon3 ¶
func (*Class) SpawnPosition ¶
type ConfigOptionValue ¶
type ConsoleTextEvent ¶
type DefaultCheckpoint ¶
type DefaultCheckpoint struct {
// contains filtered or unexported fields
}
func (*DefaultCheckpoint) Disable ¶
func (c *DefaultCheckpoint) Disable()
func (*DefaultCheckpoint) Enable ¶
func (c *DefaultCheckpoint) Enable()
func (*DefaultCheckpoint) IsEnabled ¶
func (c *DefaultCheckpoint) IsEnabled() bool
func (*DefaultCheckpoint) IsPlayerInside ¶
func (c *DefaultCheckpoint) IsPlayerInside() bool
func (*DefaultCheckpoint) Position ¶
func (c *DefaultCheckpoint) Position() Vector3
func (*DefaultCheckpoint) Radius ¶
func (c *DefaultCheckpoint) Radius() float32
func (*DefaultCheckpoint) SetPosition ¶
func (c *DefaultCheckpoint) SetPosition(pos Vector3)
func (*DefaultCheckpoint) SetRadius ¶
func (c *DefaultCheckpoint) SetRadius(radius float32)
type DialogResponse ¶
type DialogResponse int
const ( DialogResponseRight DialogResponse = iota DialogResponseLeft )
type DisconnectReason ¶
type DisconnectReason int
const ( DisconnectReasonTimeout DisconnectReason = iota DisconnectReasonQuit DisconnectReasonKicked DisconnectReasonCustom DisconnectReasonModeEnd )
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func NewDispatcher() *Dispatcher
func (*Dispatcher) HandleEvent ¶
func (d *Dispatcher) HandleEvent(ctx context.Context, e Event) error
func (*Dispatcher) HasListener ¶
func (d *Dispatcher) HasListener(_type EventType) bool
func (*Dispatcher) Listen ¶
func (d *Dispatcher) Listen(_type EventType, listener Listener)
func (*Dispatcher) ListenFunc ¶
func (*Dispatcher) Subscribe ¶
func (d *Dispatcher) Subscribe(subscriber Subscriber)
func (*Dispatcher) SubscribeFunc ¶
func (d *Dispatcher) SubscribeFunc(subscriber func() any)
type EnterExitModShopEvent ¶
type EventType ¶
type EventType string
const ( EventTypeGameModeInit EventType = "gameModeInit" EventTypeGameModeExit EventType = "gameModeExit" // Actor events EventTypePlayerGiveDamageActor EventType = "playerGiveDamageActor" EventTypeActorStreamOut EventType = "actorStreamOut" EventTypeActorStreamIn EventType = "actorStreamIn" // Checkpoint events EventTypePlayerEnterCheckpoint EventType = "playerEnterCheckpoint" EventTypePlayerLeaveCheckpoint EventType = "playerLeaveCheckpoint" EventTypePlayerEnterRaceCheckpoint EventType = "playerEnterRaceCheckpoint" EventTypePlayerLeaveRaceCheckpoint EventType = "playerLeaveRaceCheckpoint" // Class events EventTypePlayerRequestClass EventType = "playerRequestClass" // Console events EventTypeConsoleText EventType = "consoleText" EventTypeRconLoginAttempt EventType = "rconLoginAttempt" // Custom model events EventTypePlayerFinishedDownloading EventType = "playerFinishedDownloading" EventTypePlayerRequestDownload EventType = "playerRequestDownload" // Player dialog event EventTypeDialogResponse EventType = "dialogResponse" EventTypeDialogShow EventType = "dialogShow" EventTypeDialogHide EventType = "dialogHide" // Turf events EventTypePlayerEnterTurf EventType = "playerEnterTurf" EventTypePlayerEnterPlayerTurf EventType = "playerEnterPlayerTurf" EventTypePlayerLeaveTurf EventType = "playerLeaveTurf" EventTypePlayerLeavePlayerTurf EventType = "playerLeavePlayerTurf" EventTypePlayerClickTurf EventType = "playerClickTurf" EventTypePlayerClickPlayerTurf EventType = "playerClickPlayerTurf" // Menu events EventTypePlayerSelectedMenuRow EventType = "playerSelectedMenuRow" EventTypePlayerExitedMenu EventType = "playerExitedMenu" // Object events EventTypeObjectMoved EventType = "objectMoved" EventTypePlayerObjectMoved EventType = "playerObjectMoved" EventTypeObjectSelected EventType = "objectSelected" EventTypePlayerObjectSelected EventType = "playerObjectSelected" EventTypeObjectEdited EventType = "objectEdited" EventTypePlayerObjectEdited EventType = "playerObjectEdited" EventTypePlayerAttachmentEdited EventType = "playerAttachmentEdited" // Pickup events EventTypePlayerPickUpPickup EventType = "playerPickUpPickup" EventTypePlayerPickUpPlayerPickup EventType = "playerPickUpPlayerPickup" // Player spawn events EventTypePlayerRequestSpawn EventType = "playerRequestSpawn" EventTypePlayerSpawn EventType = "playerSpawn" // Player connect events EventTypeIncomingConnection EventType = "incomingConnection" EventTypePlayerConnect EventType = "playerConnect" EventTypePlayerDisconnect EventType = "playerDisconnect" EventTypePlayerClientInit EventType = "playerClientInit" // Player stream events EventTypePlayerStreamIn EventType = "playerStreamIn" EventTypePlayerStreamOut EventType = "playerStreamOut" // Player text events EventTypePlayerText EventType = "playerText" EventTypePlayerCommandText EventType = "playerCommandText" // Player shot events EventTypePlayerShotMissed EventType = "playerShotMissed" EventTypePlayerShotPlayer EventType = "playerShotPlayer" EventTypePlayerShotVehicle EventType = "playerShotVehicle" EventTypePlayerShotObject EventType = "playerShotObject" EventTypePlayerShotPlayerObject EventType = "playerShotPlayerObject" // Player change events EventTypePlayerScoreChange EventType = "playerScoreChange" EventTypePlayerNameChange EventType = "playerNameChange" EventTypePlayerInteriorChange EventType = "playerInteriorChange" EventTypePlayerStateChange EventType = "playerStateChange" EventTypePlayerKeyStateChange EventType = "playerKeyStateChange" // Player damage events EventTypePlayerDeath EventType = "playerDeath" EventTypePlayerTakeDamage EventType = "playerTakeDamage" EventTypePlayerGiveDamage EventType = "playerGiveDamage" // Player click events EventTypePlayerClickMap EventType = "playerClickMap" EventTypePlayerClickPlayer EventType = "playerClickPlayer" // Player check events EventTypeClientCheckResponse EventType = "clientCheckResponse" // Player update event EventTypePlayerUpdate EventType = "playerUpdate" // TextDraw events EventTypePlayerClickTextDraw EventType = "playerClickTextDraw" EventTypePlayerClickPlayerTextDraw EventType = "playerClickPlayerTextDraw" EventTypePlayerCancelTextDrawSelection EventType = "playerCancelTextDrawSelection" EventTypePlayerCancelPlayerTextDrawSelection EventType = "playerCancelPlayerTextDrawSelection" // Vehicle events EventTypeVehicleStreamIn EventType = "vehicleStreamIn" EventTypeVehicleStreamOut EventType = "vehicleStreamOut" EventTypeVehicleDeath EventType = "vehicleDeath" EventTypePlayerEnterVehicle EventType = "playerEnterVehicle" EventTypePlayerExitVehicle EventType = "playerExitVehicle" EventTypeVehicleDamageStatusUpdate EventType = "vehicleDamageStatusUpdate" EventTypeVehiclePaintJob EventType = "vehiclePaintJob" EventTypeVehicleMod EventType = "vehicleMod" EventTypeVehicleRespray EventType = "vehicleRespray" EventTypeEnterExitModShop EventType = "enterExitModShop" EventTypeVehicleSpawn EventType = "vehicleSpawn" EventTypeUnoccupiedVehicleUpdate EventType = "unoccupiedVehicleUpdate" EventTypeTrailerUpdate EventType = "trailerUpdate" EventTypeVehicleSirenStateChange EventType = "vehicleSirenStateChange" )
type IncomingConnectionEvent ¶
type InputDialog ¶
type InputDialog struct {
Events *Dispatcher
Title, Body, Button1, Button2 string
// contains filtered or unexported fields
}
func NewInputDialog ¶
func NewInputDialog(title, body, button1, button2 string) *InputDialog
func NewPasswordDialog ¶
func NewPasswordDialog(title, body, button1, button2 string) *InputDialog
func (*InputDialog) HideFor ¶
func (d *InputDialog) HideFor(player *Player)
func (*InputDialog) ShowFor ¶
func (d *InputDialog) ShowFor(player *Player)
type InputDialogResponseEvent ¶
type InputDialogResponseEvent struct {
Player *Player
Response DialogResponse
InputText string
}
type ListDialog ¶
type ListDialog struct {
Events *Dispatcher
Title, Button1, Button2 string
// contains filtered or unexported fields
}
func NewListDialog ¶
func NewListDialog(title, button1, button2 string) *ListDialog
func (*ListDialog) Add ¶
func (d *ListDialog) Add(items ...string)
func (*ListDialog) HideFor ¶
func (d *ListDialog) HideFor(player *Player)
func (*ListDialog) SetItems ¶
func (d *ListDialog) SetItems(items []string)
func (*ListDialog) ShowFor ¶
func (d *ListDialog) ShowFor(player *Player)
type ListDialogResponseEvent ¶
type ListDialogResponseEvent struct {
Player *Player
Response DialogResponse
ItemNumber int
Item string
}
type Listener ¶
func EventListener ¶
func EventListener() Listener
type ListenerFunc ¶
func (ListenerFunc) HandleEvent ¶
func (f ListenerFunc) HandleEvent(ctx context.Context, e Event) error
type Menu ¶
type Menu struct {
// contains filtered or unexported fields
}
func (*Menu) ColumnCount ¶
func (*Menu) ColumnHeader ¶
func (*Menu) ColumnWidths ¶
func (*Menu) DisableRow ¶
func (*Menu) IsRowEnabled ¶
func (*Menu) SetColumnHeader ¶
type MessageDialog ¶
type MessageDialog struct {
Events *Dispatcher
Title, Body, Button1, Button2 string
}
func NewMessageDialog ¶
func NewMessageDialog(title, body, button1, button2 string) *MessageDialog
func (*MessageDialog) HideFor ¶
func (d *MessageDialog) HideFor(player *Player)
func (*MessageDialog) ShowFor ¶
func (d *MessageDialog) ShowFor(player *Player)
type MessageDialogResponseEvent ¶
type MessageDialogResponseEvent struct {
Player *Player
Response DialogResponse
}
type NPC ¶
type NPC struct {
// contains filtered or unexported fields
}
func GetNPCByID ¶
func (*NPC) AimAtPlayer ¶
func (*NPC) FacingAngle ¶
func (*NPC) IsInvulnerable ¶
func (*NPC) IsPlayingPlayback ¶
func (*NPC) IsStreamedInFor ¶
func (*NPC) Keys ¶
func (n *NPC) Keys() NPCKeyData
func (*NPC) MoveToPlayer ¶
func (*NPC) PausePlayback ¶
func (n *NPC) PausePlayback()
func (*NPC) PutInVehicle ¶
func (*NPC) RemoveFromVehicle ¶
func (n *NPC) RemoveFromVehicle()
func (*NPC) ResumePlayback ¶
func (n *NPC) ResumePlayback()
func (*NPC) SetFacingAngle ¶
func (*NPC) SetInterior ¶
func (*NPC) SetInvulnerable ¶
func (*NPC) SetPosition ¶
func (*NPC) SetRotation ¶
func (*NPC) SetVirtualWorld ¶
func (*NPC) SetWeaponAccuracy ¶
func (*NPC) SetWeaponSkillLevel ¶
func (n *NPC) SetWeaponSkillLevel(skill PlayerWeaponSkill, level int)
func (*NPC) StartPlayback ¶
func (*NPC) StopPlayback ¶
func (n *NPC) StopPlayback()
func (*NPC) VehicleSeat ¶
func (*NPC) VirtualWorld ¶
type NPCKeyData ¶
type NPCMoveType ¶
type NPCMoveType int
const ( NPCMoveTypeAuto NPCMoveType = iota NPCMoveTypeWalk NPCMoveTypeRun NPCMoveTypeSprint NPCMoveTypeDrive )
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
func (*Object) AttachToPlayer ¶
func (*Object) AttachToVehicle ¶
func (*Object) DisableCameraCollision ¶
func (o *Object) DisableCameraCollision()
func (*Object) DrawDistance ¶
func (*Object) EnableCameraCollision ¶
func (o *Object) EnableCameraCollision()
func (*Object) IsCameraCollisionEnabled ¶
func (*Object) IsMaterialSlotUsed ¶
func (*Object) MaterialText ¶
func (o *Object) MaterialText(slotIdx int) (ObjectMaterialText, error)
func (*Object) MovingData ¶
func (o *Object) MovingData() ObjectMoveData
func (*Object) ResetAttachment ¶
func (o *Object) ResetAttachment()
func (*Object) SetDrawDistance ¶
func (*Object) SetMaterial ¶
func (*Object) SetMaterialText ¶
func (o *Object) SetMaterialText( slotIdx int, text string, size ObjectMaterialSize, fontFace string, fontSize int, bold bool, fontColor, bgColor uint, align ObjectMaterialTextAlign, )
func (*Object) SetPosition ¶
func (*Object) SetRotation ¶
type ObjectAttachmentData ¶
type ObjectAttachmentData[T ObjectAttachmentTarget] struct { SyncRotation bool Target T Offset Vector3 Rotation Vector3 }
func ObjectAttachedData ¶
func ObjectAttachedData[T ObjectAttachmentTarget](obj *Object) (ObjectAttachmentData[T], error)
type ObjectAttachmentTarget ¶
type ObjectEditResponse ¶
type ObjectEditResponse int
type ObjectEditedEvent ¶
type ObjectEditedEvent struct {
Player *Player
Object *Object
Response ObjectEditResponse
Offset Vector3
Rotation Vector3
}
type ObjectMaterial ¶
type ObjectMaterialSize ¶
type ObjectMaterialSize int
type ObjectMaterialText ¶
type ObjectMaterialTextAlign ¶
type ObjectMaterialTextAlign int
type ObjectMoveData ¶
type ObjectMovedEvent ¶
type ObjectMovedEvent struct {
Object *Object
}
type ObjectSelectedEvent ¶
type Pickup ¶
type Pickup struct {
// contains filtered or unexported fields
}
func (*Pickup) IsHiddenFor ¶
func (*Pickup) IsStreamedInFor ¶
func (*Pickup) SetPosition ¶
func (*Pickup) SetType ¶
func (p *Pickup) SetType(_type PickupType)
func (*Pickup) SetVirtualWorld ¶
func (*Pickup) Type ¶
func (p *Pickup) Type() PickupType
func (*Pickup) VirtualWorld ¶
type PickupType ¶
type PickupType uint8
type Player ¶
type Player struct {
// contains filtered or unexported fields
}
func (*Player) Action ¶
func (p *Player) Action() PlayerSpecialAction
Action returns the player's current special action.
func (*Player) AllowTeleport ¶
func (p *Player) AllowTeleport()
AllowTeleport enables the teleporting ability for the player by right-clicking on the map.
func (*Player) AllowWeapons ¶
func (p *Player) AllowWeapons()
AllowWeapons allows weapons for the player.
func (*Player) AnimationFlags ¶
AnimationFlags returns the player animation flags.
func (*Player) AnimationIndex ¶
AnimationIndex returns the index of any running applied animations.
func (*Player) ApplyAnimation ¶
func (p *Player) ApplyAnimation(anim Animation, syncType PlayerAnimationSyncType)
ApplyAnimation applies an animation to the player.
func (*Player) AreWeaponsAllowed ¶
AreWeaponsAllowed reports whether weapons are allowed for this player.
func (*Player) ArmedWeapon ¶
ArmedWeapon returns the weapon the player is currently holding.
func (*Player) ArmedWeaponAmmo ¶
ArmedWeaponAmmo returns the amount of ammo in the player's current weapon.
func (*Player) AttachCameraToObject ¶
AttachCameraToObject attaches the player camera to objects.
func (*Player) Attachment ¶
func (p *Player) Attachment(slotIdx int) PlayerAttachment
Attachment returns the player attachment object data by slot index.
func (*Player) BeginObjectEditing ¶
BeginObjectEditing allows the player to edit an object (position and rotation) using their mouse on a GUI (Graphical User Interface).
func (*Player) BeginObjectSelecting ¶
func (p *Player) BeginObjectSelecting()
BeginObjectSelecting displays the cursor and allows the player to select an object. EventTypeObjectSelected is called when the player selects an object.
func (*Player) CameraAspectRatio ¶
CameraAspectRatio returns the aspect ratio of the player's camera.
func (*Player) CameraFrontVector ¶
CameraFrontVector returns the current direction of player's aiming in 3-D space, the coords are relative to the camera position, see CameraPosition method.
func (*Player) CameraLookAt ¶
func (*Player) CameraMode ¶
CameraMode returns the current GTA camera mode for the requested player. The camera modes are useful in determining whether a player is aiming, doing a passenger driveby etc.
func (*Player) CameraPosition ¶
CameraPosition returns the position of the player's camera.
func (*Player) CameraTargetActor ¶
CameraTargetActor returns the actor the player is looking at (if any).
func (*Player) CameraTargetObject ¶
CameraTargetActor returns the object the player is looking at (if any).
func (*Player) CameraTargetPlayer ¶
CameraTargetActor returns the player the player is looking at (if any).
func (*Player) CameraTargetVehicle ¶
CameraTargetActor returns the vehicle the player is looking at (if any).
func (*Player) CameraZoom ¶
CameraZoom returns the game camera zoom level for the player.
func (*Player) ClearAnimations ¶
func (p *Player) ClearAnimations(syncType PlayerAnimationSyncType)
ClearAnimations clears all animations for the player. It also cancels all current tasks such as jetpacking, parachuting, entering vehicles, driving (removes player out of vehicle), swimming, etc.
func (*Player) ClientVersion ¶
func (*Player) ClientVersionName ¶
func (*Player) Color ¶
Color returns the color of the player's name and radar marker. Only works after SetColor.
func (*Player) CreateExplosion ¶
CreateExplosion creates an explosion that is only visible to the player. This can be used to isolate explosions from other players or to make them only appear in specific virtual worlds.
func (*Player) CustomSkin ¶
CustomSkin returns the class of the players custom skin downloaded from the server.
func (*Player) DefaultCheckpoint ¶
func (p *Player) DefaultCheckpoint() *DefaultCheckpoint
DefaultCheckpoint returns the player's default checkpoint.
func (*Player) DialogData ¶
func (p *Player) DialogData()
func (*Player) DisableCameraTargeting ¶
func (p *Player) DisableCameraTargeting()
DisableCameraTargeting disables camera targetting functions for the player. Disabled by default to save bandwidth.
func (*Player) DisableGhostMode ¶
func (p *Player) DisableGhostMode()
DisableGhostMode disables the player's ghost mode. Ghost mode disables the collision between player models.
func (*Player) DisableRemoteVehicleCollisions ¶
func (p *Player) DisableRemoteVehicleCollisions()
DisableRemoteVehicleCollisions disables collisions between occupied vehicles for the player.
func (*Player) DisableSpectating ¶
func (p *Player) DisableSpectating()
DisableSpectating disables the player's spectator mode.
func (*Player) DisableStuntBonuses ¶
func (p *Player) DisableStuntBonuses()
DisableStuntBonuses disables stunt bonuses for the player.
func (*Player) DisableWidescreen ¶
func (p *Player) DisableWidescreen()
DisableWidescreen disables player's widescreen.
func (*Player) DisallowTeleport ¶
func (p *Player) DisallowTeleport()
DisallowTeleport disables the teleporting ability for the player by right-clicking on the map.
func (*Player) DisallowWeapons ¶
func (p *Player) DisallowWeapons()
DisallowWeapons disallows weapons for the player.
func (*Player) DistanceFrom ¶
DistanceFrom calculates the distance between the player and a map coordinate.
func (*Player) DrunkLevel ¶
DrunkLevel returns the player's level of drunkenness. If the level is less than 2000, the player is sober. The player's level of drunkness goes down slowly automatically (26 levels per second) but will always reach 2000 at the end. The higher drunkenness levels affect the player's camera, and the car driving handling. The level of drunkenness increases when the player drinks from a bottle (You can use SetSpecialAction to give them bottles).
func (*Player) EditAttachment ¶
EditAttachment enters edition mode for an attached object.
func (*Player) EnableCameraTargeting ¶
func (p *Player) EnableCameraTargeting()
EnableCameraTargeting enables camera targetting functions for the player. Disabled by default to save bandwidth.
func (*Player) EnableGhostMode ¶
func (p *Player) EnableGhostMode()
EnableGhostMode enables the player's ghost mode. Ghost mode disables the collision between player models.
func (*Player) EnableRemoteVehicleCollisions ¶
func (p *Player) EnableRemoteVehicleCollisions()
EnableRemoteVehicleCollisions enables collisions between occupied vehicles for the player.
func (*Player) EnableSpectating ¶
func (p *Player) EnableSpectating()
EnableSpectating toggle the player to be in spectator mode. While in spectator mode the player can spectate (watch) other players and vehicles. After using this function, either SpectatePlayer or SpectateVehicle needs to be used.
func (*Player) EnableStuntBonuses ¶
func (p *Player) EnableStuntBonuses()
EnableStuntBonuses enables stunt bonuses for the player.
func (*Player) EnableWidescreen ¶
func (p *Player) EnableWidescreen()
EnableWidescreen enables player's widescreen.
func (*Player) EndObjectEditing ¶
func (p *Player) EndObjectEditing()
EndObjectEditing cancels object edition mode for the player.
func (*Player) FacingAngle ¶
FacingAngle returns the angle the player is facing.
func (*Player) FightingStyle ¶
func (p *Player) FightingStyle() PlayerFightingStyle
FightingStyle returns the fighting style the player currently using.
func (*Player) ForceClassSelection ¶
func (p *Player) ForceClassSelection()
ForceClassSelection the player to go back to class selection.
func (*Player) Freeze ¶
func (p *Player) Freeze()
Freeze freezes the player so that it cannot control their character. The player will also be unable to move their camera.
func (*Player) GameText ¶
func (p *Player) GameText(style int) *PlayerGameText
GameText returns all the information on the given game text style.
func (*Player) GiveWeapon ¶
GiveWeapon gives the player a weapon with a specified amount of ammo.
func (*Player) HasAttachment ¶
HasAttachment reports whether the player has an attachment in the specified slot index.
func (*Player) Health ¶
Health allows you to retrieve the health of the player. Useful for cheat detection, among other things.
func (*Player) HideClock ¶
func (p *Player) HideClock()
HideClock hides the in-game clock (top-right corner) for the player.
func (*Player) HideGameText ¶
HideGameText stops showing a gametext style to the player.
func (*Player) HideNameTagFor ¶
HideNameTagFor disables the drawing of player nametags, healthbars and armor bars which display above their head.
func (*Player) Interior ¶
Interior returns the player's current interior. A list of currently known interiors with their positions can be found on this page: https://www.open.mp/docs/scripting/resources/interiorids
func (*Player) InterpolateCameraLookAt ¶
func (p *Player) InterpolateCameraLookAt(from Vector3, to Vector3, time int, cutType PlayerCameraCutType)
InterpolateCameraLookAt interpolates the player's camera's 'look at' point between two coordinates with a set speed. Can be be used with InterpolateCameraPosition.
func (*Player) InterpolateCameraPosition ¶
func (p *Player) InterpolateCameraPosition(from Vector3, to Vector3, time int, cutType PlayerCameraCutType)
InterpolateCameraPosition moves the player's camera from one position to another, within the set time. Useful for scripted cut scenes.
func (*Player) IsCameraTargetingEnabled ¶
IsCameraTargetingEnabled reports whether camera targetting functions are enabled for the player. Disabled by default to save bandwidth.
func (*Player) IsClockShown ¶
IsClockShown reports whether the in-game clock is shown for the player.
func (*Player) IsEditingObject ¶
IsEditingObject reports whether the player is in object edition mode.
func (*Player) IsGameTextShown ¶
IsGameTextShown reports whether the player currently have text in the given gametext style displayed.
func (*Player) IsGhostModeEnabled ¶
IsGhostModeEnabled reports whether ghost mode is enabled.
func (*Player) IsInRangeOf ¶
IsInRangeOf reports whether the player is in range of a point.
func (*Player) IsSelectingObject ¶
IsSelectingObject reports whether the player is in object selection mode.
func (*Player) IsStreamedInFor ¶
IsStreamedInFor reports whether the player is streamed in another player's client.
func (*Player) IsTeleportAllowed ¶
Reports whether the teleporting ability for the player by right-clicking on the map is enabled.
func (*Player) IsUsingOfficialClient ¶
IsUsingOfficialClient reports whether the player is using the official SA-MP client.
func (*Player) IsWidescreenEnabled ¶
IsWidescreenEnabled reports whether player's widescreen is enabled.
func (*Player) KeyData ¶
func (p *Player) KeyData() PlayerKeyData
KeyData checks which keys the player is pressing.
func (*Player) Kick ¶
func (p *Player) Kick()
Kick kicks the player from the server. They will have to quit the game and re-connect if they wish to continue playing.
func (*Player) LastPlayedAudio ¶
LastPlayedAudio returns the player's last played audio URL.
func (*Player) LastPlayedSound ¶
LastPlayedSound returns the sound that was last played for the player.
func (*Player) MakeAdmin ¶
func (p *Player) MakeAdmin()
MakeAdmin makes the player as an RCON admin.
func (*Player) NetworkStats ¶
func (p *Player) NetworkStats()
func (*Player) Ping ¶
Ping returns the ping of the player. The ping measures the amount of time it takes for the server to 'ping' the client and for the client to send the message back.
func (*Player) PlayAudio ¶
PlayAudio plays an 'audio stream' for the player. Normal audio files also work (e.g. MP3).
func (*Player) PlayCrimeReport ¶
PlayCrimeReport plays a crime report for the player - just like in single-player when CJ commits a crime.
func (*Player) RaceCheckpoint ¶
func (p *Player) RaceCheckpoint() *RaceCheckpoint
RaceCheckpoint returns the player's race checkpoint.
func (*Player) RedirectDownload ¶
func (*Player) RemoveAttachment ¶
RemoveAttachment removes an attached object from the player.
func (*Player) RemoveDefaultObjects ¶
RemoveDefaultObjects removes a standard San Andreas model for the player within a specified range.
func (*Player) RemoveFromVehicle ¶
RemoveFromVehicle removes/ejects the player from their vehicle.
func (*Player) RemoveWeapon ¶
RemoveWeapon removes a specified weapon from the player.
func (*Player) RemovedBuildingCount ¶
RemovedBuildingCount returns the number of removed buildings for the player.
func (*Player) ResetMoney ¶
func (p *Player) ResetMoney()
ResetMoney resets the player's money to $0.
func (*Player) ResetWeapons ¶
func (p *Player) ResetWeapons()
ResetWeapons removes all weapons from a player.
func (*Player) SendClientCheck ¶
SendClientCheck performs a memory check on the client.
func (*Player) SendClientMessage ¶
SendClientMessage sends a message to the player with a chosen color in the chat. The whole line in the chatbox will be in the set color unless color embedding is used.
func (*Player) SendDeathMessage ¶
SendDeathMessage adds a death to the 'killfeed' on the right-hand side of the screen for the player.
func (*Player) SendEmptyDeathMessage ¶
func (p *Player) SendEmptyDeathMessage()
func (*Player) SendMessageFrom ¶
SendMessageFrom sends a message in the name of a player to this player on the server. The message will appear in the chat box, but can only be seen by the player. The line will start with the sender's name in their color, followed by the message in white.
func (*Player) Serial ¶
Serial fetches the CI of the player, this is linked to their SAMP/GTA on their computer.
func (*Player) SetAction ¶
func (p *Player) SetAction(action PlayerSpecialAction)
SetAction sets the players special action.
func (*Player) SetArmedWeapon ¶
SetArmedWeapon sets which weapon (that the player already has) the player is holding.
func (*Player) SetAttachment ¶
func (p *Player) SetAttachment(slotIdx int, attachment PlayerAttachment)
SetAttachment attaches an object to a specific bone on the player.
func (*Player) SetCameraBehind ¶
func (p *Player) SetCameraBehind()
SetCameraBehind restores the camera to a place behind the player, after using a function like SetCameraPosition.
func (*Player) SetCameraLookAt ¶
func (p *Player) SetCameraLookAt(pos Vector3, cutType PlayerCameraCutType)
SetCameraLookAt sets the direction the player's camera looks at. Generally meant to be used in combination with SetCameraPosition.
func (*Player) SetCameraPosition ¶
SetCameraPosition sets the camera to a specific position for the player.
func (*Player) SetChatBubble ¶
SetChatBubble creates a chat bubble above the player's name tag.
func (*Player) SetColorFor ¶
SetColorFor sets another player's color for this player
func (*Player) SetDrunkLevel ¶
SetDrunkLevel sets the drunk level of the player which makes the player's camera sway and vehicles hard to control.
func (*Player) SetFacingAngle ¶
SetFacingAngle sets the player's facing angle (Z rotation).
func (*Player) SetFightingStyle ¶
func (p *Player) SetFightingStyle(style PlayerFightingStyle)
SetFightingStyle sets the player's special fighting style. To use in-game, aim and press the 'secondary attack' key (ENTER by default).
func (*Player) SetGravity ¶
SetGravity sets the player's gravity.
func (*Player) SetInterior ¶
SetInterior sets the player's interior. A list of currently known interiors and their positions can be found here: https://www.open.mp/docs/scripting/resources/interiorids
func (*Player) SetMapIcon ¶
SetMapIcon places an icon/marker on the player's map. Can be used to mark locations such as banks and hospitals to players.
func (*Player) SetName ¶
func (p *Player) SetName(name string) PlayerNameStatus
SetName sets the name of the player.
func (*Player) SetPosition ¶
SetPosition sets the player's position.
func (*Player) SetPositionFindZ ¶
SetPositionFindZ sets the player's position then adjusts the player's z-coordinate to the nearest solid ground under the position.
func (*Player) SetScore ¶
SetScore sets the player's score. Players' scores are shown in the scoreboard (shown by holding the TAB key).
func (*Player) SetShopName ¶
SetShopName loads or unloads an interior script for the player (for example the ammunation menu).
func (*Player) SetSkillLevel ¶
func (p *Player) SetSkillLevel(skill PlayerWeaponSkill, level int)
SetSkillLevel sets the skill level of a certain weapon type for the player.
func (*Player) SetSkin ¶
SetSkin sets the skin of the player. A player's skin is their character model.
func (*Player) SetTime ¶
func (p *Player) SetTime(time PlayerTime)
SetTime sets the game time for the player. If the player's clock is enabled (EnableClock) the time displayed by it will update automatically.
func (*Player) SetVelocity ¶
SetVelocity sets the player's velocity on the X, Y and Z axes.
func (*Player) SetVirtualWorld ¶
SetVirtualWorld sets the virtual world of the player. They can only see other players or vehicles that are in that same world.
func (*Player) SetWantedLevel ¶
SetWantedLevel sets the player's wanted level (6 brown stars under HUD).
func (*Player) SetWeaponAmmo ¶
SetWeaponAmmo sets the ammo of the player's weapon.
func (*Player) SetWeather ¶
SetWeather sets the player's weather.
func (*Player) SetWorldBounds ¶
SetWorldBounds sets the world boundaries for the player. Players can not go out of the boundaries (they will be pushed back in).
func (*Player) SetWorldTime ¶
SetWorldTime sets the game time for the player. If the player's clock is enabled (ShowClock) the time displayed by it will update automatically.
func (*Player) ShowClock ¶
func (p *Player) ShowClock()
ShowClock shows the in-game clock (top-right corner) for the player. When this is enabled, time will progress at 1 minute per second. Weather will also interpolate (slowly change over time) when set using SetWeather/(*Player).SetWeather.
func (*Player) ShowGameText ¶
ShowGameText shows 'game text' (on-screen text) for a certain length of time for the player.
func (*Player) ShowNameTagFor ¶
ShowNameTagFor enables the drawing of player nametags, healthbars and armor bars which display above their head. For use of a similar function like this on a global level, ShowNameTags function.
func (*Player) SpectatePlayer ¶
func (p *Player) SpectatePlayer(player *Player, mode PlayerSpectateMode)
SpectatePlayer makes the player spectate (watch) another player.
func (*Player) SpectateVehicle ¶
func (p *Player) SpectateVehicle(vehicle *Vehicle, mode PlayerSpectateMode)
SpectateVehicle sets the player to spectate another vehicle. Their camera will be attached to the vehicle as if they are driving it.
func (*Player) SpectatingPlayer ¶
SpectatingPlayer returns the player the player is spectating (watching).
func (*Player) SpectatingVehicle ¶
SpectatingVehicle returns the vehicle the player is spectating (watching).
func (*Player) State ¶
func (p *Player) State() PlayerState
State returns the player's current state.
func (*Player) StopAudio ¶
func (p *Player) StopAudio()
StopAudio stops the current audio stream for the player.
func (*Player) TargetActor ¶
TargetActor returns the actor which is aimed by the player.
func (*Player) TargetPlayer ¶
TargetPlayer checks who the player is aiming at.
func (*Player) Time ¶
func (p *Player) Time() PlayerTime
Time returns the player's current game time. Set by SetWorldTime, or by the game automatically if EnableClock is used.
func (*Player) Unfreeze ¶
func (p *Player) Unfreeze()
Unfreeze unfreezes the player so that it can control their character.
func (*Player) UnmakeAdmin ¶
func (p *Player) UnmakeAdmin()
MakeAdmin unmakes the player as an RCON admin.
func (*Player) UnsetMapIcon ¶
UnsetMapIcon removes a map icon for the player.
func (*Player) UnsetWorldBounds ¶
func (p *Player) UnsetWorldBounds()
UnsetWorldBounds resets the player's world boundaries to default world boundaries.
func (*Player) VehicleSeat ¶
VehicleSeat returns the seat the player is in.
func (*Player) VirtualWorld ¶
VirtualWorld returns the virtual world of the player.
func (*Player) WantedLevel ¶
WantedLevel returns the wanted level of the player.
func (*Player) WeaponSlot ¶
func (p *Player) WeaponSlot(slotIdx WeaponSlotIndex) (WeaponSlot, error)
WeaponSlot returns the weapon slot at a specified slot index An error is returned if invalid slot index is specified
func (*Player) WeaponSlots ¶
func (p *Player) WeaponSlots() []*WeaponSlot
func (*Player) WeaponState ¶
func (p *Player) WeaponState() PlayerWeaponState
WeaponState checks the state of the player's weapon.
func (*Player) WorldBounds ¶
WorldBounds returns the player's world boundaries.
type PlayerAnimationSyncType ¶
type PlayerAnimationSyncType int
const ( PlayerAnimationSyncTypeNoSync PlayerAnimationSyncType = iota PlayerAnimationSyncTypeSync PlayerAnimationSyncTypeSyncOthers )
type PlayerAttachment ¶
type PlayerAttachment struct {
ModelID int
Bone PlayerBone
Offset, Rot, Scale Vector3
Color1, Color2 uint
}
type PlayerAttachmentEdited ¶
type PlayerAttachmentEdited struct {
Player *Player
Index int
Saved bool
Attachment PlayerAttachment
}
type PlayerBone ¶
type PlayerBone int
const ( PlayerBoneSpine PlayerBone = iota + 1 PlayerBoneHead PlayerBoneLeftUpperArm PlayerBoneRightUpperArm PlayerBoneLeftHand PlayerBoneRightHand PlayerBoneLeftThigh PlayerBoneRightThigh PlayerBoneLeftFoot PlayerBoneRightFoot PlayerBoneRightCalf PlayerBoneLeftCalf PlayerBoneLeftForearm PlayerBoneRightForearm PlayerBoneLeftClavicle PlayerBoneRightClavicle PlayerBoneNeck PlayerBoneJaw )
type PlayerBullet ¶
type PlayerBulletHitType ¶
type PlayerBulletHitType int
const ( PlayerBulletHitTypeNone PlayerBulletHitType = iota PlayerBulletHitTypePlayer PlayerBulletHitTypeVehicle PlayerBulletHitTypeObject PlayerBulletHitTypePlayerObject )
type PlayerCameraCutType ¶
type PlayerCameraCutType int
const ( PlayerCameraCutTypeCut PlayerCameraCutType = iota PlayerCameraCutTypeMove )
type PlayerCancelPlayerTextDrawSelectionEvent ¶
type PlayerCancelPlayerTextDrawSelectionEvent struct {
Player *Player
}
type PlayerCancelTextDrawSelectionEvent ¶
type PlayerCancelTextDrawSelectionEvent struct {
Player *Player
}
type PlayerClickMapEvent ¶
type PlayerClickPlayerEvent ¶
type PlayerClickPlayerEvent struct {
Player *Player
Clicked *Player
Source PlayerClickSource
}
type PlayerClickPlayerTextDrawEvent ¶
type PlayerClickPlayerTextDrawEvent struct {
Player *Player
Textdraw *PlayerTextdraw
}
type PlayerClickPlayerTurfEvent ¶
type PlayerClickPlayerTurfEvent struct {
Player *Player
Turf *PlayerTurf
}
type PlayerClickSource ¶
type PlayerClickSource int
type PlayerClickTurfEvent ¶
type PlayerClientInitEvent ¶
type PlayerClientInitEvent struct {
Player *Player
}
type PlayerCommandTextEvent ¶
type PlayerConnectEvent ¶
type PlayerConnectEvent struct {
Player *Player
}
type PlayerDeathEvent ¶
type PlayerDisconnectEvent ¶
type PlayerDisconnectEvent struct {
Player *Player
Reason DisconnectReason
}
type PlayerEnterCheckpointEvent ¶
type PlayerEnterCheckpointEvent struct {
Player *Player
}
type PlayerEnterPlayerTurfEvent ¶
type PlayerEnterPlayerTurfEvent struct {
Player *Player
Turf *PlayerTurf
}
type PlayerEnterRaceCheckpointEvent ¶
type PlayerEnterRaceCheckpointEvent struct {
Player *Player
}
type PlayerEnterTurfEvent ¶
type PlayerEnterVehicleEvent ¶
type PlayerExitVehicleEvent ¶
type PlayerExitedMenuEvent ¶
type PlayerExitedMenuEvent struct {
Player *Player
}
type PlayerFightingStyle ¶
type PlayerFightingStyle int
const ( PlayerFightingStyleNormal PlayerFightingStyle = 4 PlayerFightingStyleBoxing PlayerFightingStyle = 5 PlayerFightingStyleKungfu PlayerFightingStyle = 6 PlayerFightingStyleKneeHead PlayerFightingStyle = 7 PlayerFightingStyleGrabKick PlayerFightingStyle = 15 PlayerFightingStyleElbow PlayerFightingStyle = 16 )
type PlayerFinishedDownloadingEvent ¶
type PlayerFinishedDownloadingEvent struct {
Player *Player
}
type PlayerGameText ¶
type PlayerGiveDamageEvent ¶
type PlayerKeyData ¶
type PlayerLeaveCheckpointEvent ¶
type PlayerLeaveCheckpointEvent struct {
Player *Player
}
type PlayerLeavePlayerTurfEvent ¶
type PlayerLeavePlayerTurfEvent struct {
Player *Player
Turf *PlayerTurf
}
type PlayerLeaveRaceCheckpointEvent ¶
type PlayerLeaveRaceCheckpointEvent struct {
Player *Player
}
type PlayerLeaveTurfEvent ¶
type PlayerNameChangeEvent ¶
type PlayerNameStatus ¶
type PlayerNameStatus int
const ( PlayerNameStatusUpdated PlayerNameStatus = iota PlayerNameStatusTaken PlayerNameStatusInvalid )
type PlayerObject ¶
type PlayerObject struct {
// contains filtered or unexported fields
}
func NewPlayerObject ¶
func (*PlayerObject) AttachToPlayer ¶
func (o *PlayerObject) AttachToPlayer(plr *Player, offset Vector3, rot Vector3)
func (*PlayerObject) AttachToVehicle ¶
func (o *PlayerObject) AttachToVehicle(veh *Vehicle, offset Vector3, rot Vector3)
func (*PlayerObject) DisableCameraCollision ¶
func (o *PlayerObject) DisableCameraCollision()
func (*PlayerObject) DrawDistance ¶
func (o *PlayerObject) DrawDistance() float32
func (*PlayerObject) EnableCameraCollision ¶
func (o *PlayerObject) EnableCameraCollision()
func (*PlayerObject) IsCameraCollisionEnabled ¶
func (o *PlayerObject) IsCameraCollisionEnabled() bool
func (*PlayerObject) IsMaterialSlotUsed ¶
func (o *PlayerObject) IsMaterialSlotUsed(slotIdx int) bool
func (*PlayerObject) IsMoving ¶
func (o *PlayerObject) IsMoving() bool
func (*PlayerObject) Material ¶
func (o *PlayerObject) Material(slotIdx int) (ObjectMaterial, error)
func (*PlayerObject) MaterialText ¶
func (o *PlayerObject) MaterialText(slotIdx int) (ObjectMaterialText, error)
func (*PlayerObject) Model ¶
func (o *PlayerObject) Model() int
func (*PlayerObject) MovingData ¶
func (o *PlayerObject) MovingData() ObjectMoveData
func (*PlayerObject) Player ¶
func (o *PlayerObject) Player() *Player
func (*PlayerObject) Position ¶
func (o *PlayerObject) Position() Vector3
func (*PlayerObject) ResetAttachment ¶
func (o *PlayerObject) ResetAttachment()
func (*PlayerObject) Rotation ¶
func (o *PlayerObject) Rotation() Vector3
func (*PlayerObject) SetDrawDistance ¶
func (o *PlayerObject) SetDrawDistance(drawDist float32)
func (*PlayerObject) SetMaterial ¶
func (o *PlayerObject) SetMaterial(idx, model int, textureLib, textureName string, color int)
func (*PlayerObject) SetMaterialText ¶
func (o *PlayerObject) SetMaterialText( slotIdx int, text string, size ObjectMaterialSize, fontFace string, fontSize int, bold bool, fontColor, bgColor uint, align ObjectMaterialTextAlign, )
func (*PlayerObject) SetModel ¶
func (o *PlayerObject) SetModel(model int)
func (*PlayerObject) SetPosition ¶
func (o *PlayerObject) SetPosition(pos Vector3)
func (*PlayerObject) SetRotation ¶
func (o *PlayerObject) SetRotation(rot Vector3)
func (*PlayerObject) Stop ¶
func (o *PlayerObject) Stop()
type PlayerObjectEditedEvent ¶
type PlayerObjectEditedEvent struct {
Player *Player
Object *PlayerObject
Response ObjectEditResponse
Offset Vector3
Rotation Vector3
}
type PlayerObjectMovedEvent ¶
type PlayerObjectMovedEvent struct {
Player *Player
Object *PlayerObject
}
type PlayerObjectSelectedEvent ¶
type PlayerObjectSelectedEvent struct {
Player *Player
Object *PlayerObject
Model int
Position Vector3
}
type PlayerPickUpPickupEvent ¶
type PlayerPickUpPlayerPickupEvent ¶
type PlayerPickUpPlayerPickupEvent struct {
Player *Player
Pickup *PlayerPickup
}
type PlayerPickup ¶
type PlayerPickup struct {
// contains filtered or unexported fields
}
func NewPlayerPickup ¶
func NewPlayerPickup(plr *Player, modelID int, _type PickupType, virtualWorld int, pos Vector3) (*PlayerPickup, error)
func (*PlayerPickup) Hide ¶
func (p *PlayerPickup) Hide()
func (*PlayerPickup) ID ¶
func (p *PlayerPickup) ID() int
func (*PlayerPickup) IsHidden ¶
func (p *PlayerPickup) IsHidden() bool
func (*PlayerPickup) IsStreamedIn ¶
func (p *PlayerPickup) IsStreamedIn() bool
func (*PlayerPickup) Model ¶
func (p *PlayerPickup) Model() int
func (*PlayerPickup) Player ¶
func (p *PlayerPickup) Player() *Player
func (*PlayerPickup) Position ¶
func (p *PlayerPickup) Position() Vector3
func (*PlayerPickup) SetModel ¶
func (p *PlayerPickup) SetModel(model int)
func (*PlayerPickup) SetPosition ¶
func (p *PlayerPickup) SetPosition(pos Vector3)
func (*PlayerPickup) SetType ¶
func (p *PlayerPickup) SetType(_type PickupType)
func (*PlayerPickup) SetVirtualWorld ¶
func (p *PlayerPickup) SetVirtualWorld(vw int)
func (*PlayerPickup) Show ¶
func (p *PlayerPickup) Show()
func (*PlayerPickup) Type ¶
func (p *PlayerPickup) Type() PickupType
func (*PlayerPickup) VirtualWorld ¶
func (p *PlayerPickup) VirtualWorld() int
type PlayerRequestClassEvent ¶
type PlayerRequestSpawnEvent ¶
type PlayerRequestSpawnEvent struct {
Player *Player
}
type PlayerScoreChangeEvent ¶
type PlayerShotMissedEvent ¶
type PlayerShotMissedEvent struct {
Player *Player
Bullet PlayerBullet
}
type PlayerShotObjectEvent ¶
type PlayerShotObjectEvent struct {
Player *Player
Target *Object
Bullet PlayerBullet
}
type PlayerShotPlayerEvent ¶
type PlayerShotPlayerEvent struct {
Player *Player
Target *Player
Bullet PlayerBullet
}
type PlayerShotPlayerObjectEvent ¶
type PlayerShotPlayerObjectEvent struct {
Player *Player
Target *PlayerObject
Bullet PlayerBullet
}
type PlayerShotVehicleEvent ¶
type PlayerShotVehicleEvent struct {
Player *Player
Target *Vehicle
Bullet PlayerBullet
}
type PlayerSpawnEvent ¶
type PlayerSpawnEvent struct {
Player *Player
}
type PlayerSpecialAction ¶
type PlayerSpecialAction int
const ( PlayerSpecialActionNone PlayerSpecialAction = iota PlayerSpecialActionDuck PlayerSpecialActionJetpack PlayerSpecialActionEnterVehicle PlayerSpecialActionExitVehicle PlayerSpecialActionDance1 PlayerSpecialActionDance2 PlayerSpecialActionDance3 PlayerSpecialActionDance4 )
const ( PlayerSpecialActionHandsUp PlayerSpecialAction = iota + 10 PlayerSpecialActionCellphone PlayerSpecialActionSitting PlayerSpecialActionStopCellphone )
const ( PlayerSpecialActionBeer PlayerSpecialAction = iota + 20 PlayerSpecialActionSmoke PlayerSpecialActionWine PlayerSpecialActionSprunk PlayerSpecialActionCuffed PlayerSpecialActionCarry )
const PlayerSpecialActionPissing PlayerSpecialAction = 68
type PlayerSpectateMode ¶
type PlayerSpectateMode int
const ( PlayerSpectateModeNormal PlayerSpectateMode = iota + 1 PlayerSpectateModeFixed PlayerSpectateModeSide )
type PlayerState ¶
type PlayerState int
const ( PlayerStateNone PlayerState = iota PlayerStateOnFoot PlayerStateDriver PlayerStatePassenger PlayerStateExitVehicle PlayerStateEnterVehicleDriver PlayerStateEnterVehiclePassenger PlayerStateWasted PlayerStateSpawned PlayerStateSpectating )
type PlayerStateChangeEvent ¶
type PlayerStateChangeEvent struct {
Player *Player
NewState PlayerState
OldState PlayerState
}
type PlayerStreamInEvent ¶
type PlayerStreamOutEvent ¶
type PlayerTakeDamageEvent ¶
type PlayerTextEvent ¶
type PlayerTextLabel ¶
type PlayerTextLabel struct {
// contains filtered or unexported fields
}
func NewPlayerTextLabel ¶
func (*PlayerTextLabel) AttachToPlayer ¶
func (tl *PlayerTextLabel) AttachToPlayer(plr *Player, offset Vector3)
func (*PlayerTextLabel) AttachToVehicle ¶
func (tl *PlayerTextLabel) AttachToVehicle(veh *Vehicle, offset Vector3)
func (*PlayerTextLabel) Color ¶
func (tl *PlayerTextLabel) Color() uint
func (*PlayerTextLabel) DetachFromPlayer ¶
func (tl *PlayerTextLabel) DetachFromPlayer(pos Vector3)
func (*PlayerTextLabel) DetachFromVehicle ¶
func (tl *PlayerTextLabel) DetachFromVehicle(pos Vector3)
func (*PlayerTextLabel) DisableLOSTest ¶
func (tl *PlayerTextLabel) DisableLOSTest()
func (*PlayerTextLabel) DrawDistance ¶
func (tl *PlayerTextLabel) DrawDistance() float32
func (*PlayerTextLabel) EnableLOSTest ¶
func (tl *PlayerTextLabel) EnableLOSTest()
func (*PlayerTextLabel) IsLOSTestEnabled ¶
func (tl *PlayerTextLabel) IsLOSTestEnabled() bool
func (*PlayerTextLabel) Player ¶
func (tl *PlayerTextLabel) Player() *Player
func (*PlayerTextLabel) Position ¶
func (tl *PlayerTextLabel) Position() Vector3
func (*PlayerTextLabel) SetColor ¶
func (tl *PlayerTextLabel) SetColor(clr uint)
func (*PlayerTextLabel) SetDrawDistance ¶
func (tl *PlayerTextLabel) SetDrawDistance(drawDist float32)
func (*PlayerTextLabel) SetPosition ¶
func (tl *PlayerTextLabel) SetPosition(pos Vector3)
func (*PlayerTextLabel) SetText ¶
func (tl *PlayerTextLabel) SetText(text string)
func (*PlayerTextLabel) SetVirtualWorld ¶
func (tl *PlayerTextLabel) SetVirtualWorld(vw int)
func (*PlayerTextLabel) Text ¶
func (tl *PlayerTextLabel) Text() string
func (*PlayerTextLabel) VirtualWorld ¶
func (tl *PlayerTextLabel) VirtualWorld() int
type PlayerTextdraw ¶
type PlayerTextdraw struct {
// contains filtered or unexported fields
}
func NewPlayerTextdraw ¶
func NewPlayerTextdraw(plr *Player, text string, pos Vector2) (*PlayerTextdraw, error)
func (*PlayerTextdraw) Alignment ¶
func (td *PlayerTextdraw) Alignment() TextDrawAlignment
func (*PlayerTextdraw) BackgroundColor ¶
func (td *PlayerTextdraw) BackgroundColor() uint
func (*PlayerTextdraw) BoxColor ¶
func (td *PlayerTextdraw) BoxColor() uint
func (*PlayerTextdraw) Color ¶
func (td *PlayerTextdraw) Color() uint
func (*PlayerTextdraw) DisableBox ¶
func (td *PlayerTextdraw) DisableBox()
func (*PlayerTextdraw) DisableProportionality ¶
func (td *PlayerTextdraw) DisableProportionality()
func (*PlayerTextdraw) DisableSelection ¶
func (td *PlayerTextdraw) DisableSelection()
func (*PlayerTextdraw) EnableBox ¶
func (td *PlayerTextdraw) EnableBox()
func (*PlayerTextdraw) EnableProportionality ¶
func (td *PlayerTextdraw) EnableProportionality()
func (*PlayerTextdraw) EnableSelection ¶
func (td *PlayerTextdraw) EnableSelection()
func (*PlayerTextdraw) Hide ¶
func (td *PlayerTextdraw) Hide()
func (*PlayerTextdraw) ID ¶
func (td *PlayerTextdraw) ID() int
func (*PlayerTextdraw) IsBoxEnabled ¶
func (td *PlayerTextdraw) IsBoxEnabled() bool
func (*PlayerTextdraw) IsProportional ¶
func (td *PlayerTextdraw) IsProportional() bool
func (*PlayerTextdraw) IsSelectable ¶
func (td *PlayerTextdraw) IsSelectable() bool
func (*PlayerTextdraw) IsShown ¶
func (td *PlayerTextdraw) IsShown() bool
func (*PlayerTextdraw) LetterSize ¶
func (td *PlayerTextdraw) LetterSize() Vector2
func (*PlayerTextdraw) Outline ¶
func (td *PlayerTextdraw) Outline() int
func (*PlayerTextdraw) Player ¶
func (td *PlayerTextdraw) Player() *Player
func (*PlayerTextdraw) Position ¶
func (td *PlayerTextdraw) Position() Vector2
func (*PlayerTextdraw) PreviewModel ¶
func (td *PlayerTextdraw) PreviewModel() int
func (*PlayerTextdraw) PreviewRotation ¶
func (td *PlayerTextdraw) PreviewRotation() Vector3
func (*PlayerTextdraw) PreviewVehicleColor ¶
func (td *PlayerTextdraw) PreviewVehicleColor() VehicleColor
func (*PlayerTextdraw) PreviewZoom ¶
func (td *PlayerTextdraw) PreviewZoom() float32
func (*PlayerTextdraw) SetAlignment ¶
func (td *PlayerTextdraw) SetAlignment(alignment TextDrawAlignment)
func (*PlayerTextdraw) SetBackgroundColor ¶
func (td *PlayerTextdraw) SetBackgroundColor(color uint)
func (*PlayerTextdraw) SetBoxColor ¶
func (td *PlayerTextdraw) SetBoxColor(color uint)
func (*PlayerTextdraw) SetColor ¶
func (td *PlayerTextdraw) SetColor(color uint)
func (*PlayerTextdraw) SetLetterSize ¶
func (td *PlayerTextdraw) SetLetterSize(size Vector2)
func (*PlayerTextdraw) SetOutline ¶
func (td *PlayerTextdraw) SetOutline(outline int)
func (*PlayerTextdraw) SetPosition ¶
func (td *PlayerTextdraw) SetPosition(pos Vector2)
func (*PlayerTextdraw) SetPreviewModel ¶
func (td *PlayerTextdraw) SetPreviewModel(model int)
func (*PlayerTextdraw) SetPreviewRotation ¶
func (td *PlayerTextdraw) SetPreviewRotation(rot Vector3)
func (*PlayerTextdraw) SetPreviewVehicleColor ¶
func (td *PlayerTextdraw) SetPreviewVehicleColor(color VehicleColor)
func (*PlayerTextdraw) SetPreviewZoom ¶
func (td *PlayerTextdraw) SetPreviewZoom(zoom float32)
func (*PlayerTextdraw) SetShadow ¶
func (td *PlayerTextdraw) SetShadow(shadow int)
func (*PlayerTextdraw) SetStyle ¶
func (td *PlayerTextdraw) SetStyle(style TextdrawStyle)
func (*PlayerTextdraw) SetText ¶
func (td *PlayerTextdraw) SetText(text string)
func (*PlayerTextdraw) SetTextSize ¶
func (td *PlayerTextdraw) SetTextSize(size Vector2)
func (*PlayerTextdraw) Shadow ¶
func (td *PlayerTextdraw) Shadow() int
func (*PlayerTextdraw) Show ¶
func (td *PlayerTextdraw) Show()
func (*PlayerTextdraw) Style ¶
func (td *PlayerTextdraw) Style() TextdrawStyle
func (*PlayerTextdraw) Text ¶
func (td *PlayerTextdraw) Text() string
func (*PlayerTextdraw) TextSize ¶
func (td *PlayerTextdraw) TextSize() Vector2
type PlayerTime ¶
type PlayerTurf ¶
type PlayerTurf struct {
// contains filtered or unexported fields
}
func NewPlayerTurf ¶
func NewPlayerTurf(plr *Player, pos TurfPosition) (*PlayerTurf, error)
func (*PlayerTurf) Color ¶
func (t *PlayerTurf) Color() uint
func (*PlayerTurf) Flash ¶
func (t *PlayerTurf) Flash(clr uint)
func (*PlayerTurf) FlashingColor ¶
func (t *PlayerTurf) FlashingColor() uint
func (*PlayerTurf) Hide ¶
func (t *PlayerTurf) Hide()
func (*PlayerTurf) IsFlashing ¶
func (t *PlayerTurf) IsFlashing() bool
func (*PlayerTurf) IsPlayerInside ¶
func (t *PlayerTurf) IsPlayerInside() bool
func (*PlayerTurf) IsShown ¶
func (t *PlayerTurf) IsShown() bool
func (*PlayerTurf) Player ¶
func (t *PlayerTurf) Player() *Player
func (*PlayerTurf) Position ¶
func (t *PlayerTurf) Position() TurfPosition
func (*PlayerTurf) SetPosition ¶
func (t *PlayerTurf) SetPosition(pos TurfPosition)
func (*PlayerTurf) Show ¶
func (t *PlayerTurf) Show(clr uint)
func (*PlayerTurf) StopFlash ¶
func (t *PlayerTurf) StopFlash()
type PlayerUpdateEvent ¶
type PlayerWeaponSkill ¶
type PlayerWeaponSkill int
type PlayerWeaponState ¶
type PlayerWeaponState int
const ( PlayerWeaponStateUnknown PlayerWeaponState = -1 PlayerWeaponStateNoBullets PlayerWeaponState = 0 PlayerWeaponStateLastBullet PlayerWeaponState = 1 PlayerWeaponStateMoreBullets PlayerWeaponState = 2 PlayerWeaponStateReloading PlayerWeaponState = 3 )
type RaceCheckpoint ¶
type RaceCheckpoint struct {
// contains filtered or unexported fields
}
func (*RaceCheckpoint) Disable ¶
func (c *RaceCheckpoint) Disable()
func (*RaceCheckpoint) Enable ¶
func (c *RaceCheckpoint) Enable()
func (*RaceCheckpoint) IsEnabled ¶
func (c *RaceCheckpoint) IsEnabled() bool
func (*RaceCheckpoint) IsPlayerInside ¶
func (c *RaceCheckpoint) IsPlayerInside() bool
func (*RaceCheckpoint) NextPosition ¶
func (c *RaceCheckpoint) NextPosition() Vector3
func (*RaceCheckpoint) Position ¶
func (c *RaceCheckpoint) Position() Vector3
func (*RaceCheckpoint) Radius ¶
func (c *RaceCheckpoint) Radius() float32
func (*RaceCheckpoint) SetNextPosition ¶
func (c *RaceCheckpoint) SetNextPosition(pos Vector3)
func (*RaceCheckpoint) SetPosition ¶
func (c *RaceCheckpoint) SetPosition(pos Vector3)
func (*RaceCheckpoint) SetRadius ¶
func (c *RaceCheckpoint) SetRadius(radius float32)
func (*RaceCheckpoint) SetType ¶
func (c *RaceCheckpoint) SetType(_type RaceCheckpointType)
func (*RaceCheckpoint) Type ¶
func (c *RaceCheckpoint) Type() RaceCheckpointType
type RaceCheckpointType ¶
type RaceCheckpointType int
const ( RaceCheckpointTypeNormal RaceCheckpointType = iota RaceCheckpointTypeFinish RaceCheckpointTypeNothing RaceCheckpointTypeAirNormal RaceCheckpointTypeAirFinish RaceCheckpointTypeAirOne RaceCheckpointTypeAirTwo RaceCheckpointTypeAirThree RaceCheckpointTypeAirFour RaceCheckpointTypeNone )
type RconLoginAttemptEvent ¶
type Subscriber ¶
type Subscriber interface {
SubscribedEvents() any
}
type SubscriberFunc ¶
type SubscriberFunc func() any
func (SubscriberFunc) SubscribedEvents ¶
func (f SubscriberFunc) SubscribedEvents() any
type TabListDialog ¶
type TabListDialog struct {
Events *Dispatcher
Title, Button1, Button2 string
// contains filtered or unexported fields
}
func NewTabListDialog ¶
func NewTabListDialog(title, button1, button2 string) *TabListDialog
func (*TabListDialog) Add ¶
func (d *TabListDialog) Add(items ...TabListItem)
func (*TabListDialog) HideFor ¶
func (d *TabListDialog) HideFor(player *Player)
func (*TabListDialog) SetHeader ¶
func (d *TabListDialog) SetHeader(header TabListItem)
func (*TabListDialog) SetItems ¶
func (d *TabListDialog) SetItems(items []TabListItem)
func (*TabListDialog) ShowFor ¶
func (d *TabListDialog) ShowFor(player *Player)
type TabListDialogResponseEvent ¶
type TabListDialogResponseEvent struct {
Player *Player
Response DialogResponse
ItemNumber int
Item TabListItem
}
type TabListItem ¶
type TabListItem []string
type TextDrawAlignment ¶
type TextDrawAlignment int
const ( TextdrawAlignmentDefault TextDrawAlignment = iota TextdrawAlignmentLeft TextdrawAlignmentCenter TextdrawAlignmentRight )
type TextLabel ¶
type TextLabel struct {
// contains filtered or unexported fields
}
func NewTextLabel ¶
func (*TextLabel) AttachToPlayer ¶
func (*TextLabel) AttachToVehicle ¶
func (*TextLabel) DetachFromPlayer ¶
func (*TextLabel) DetachFromVehicle ¶
func (*TextLabel) DisableLOSTest ¶
func (tl *TextLabel) DisableLOSTest()
func (*TextLabel) DrawDistance ¶
func (*TextLabel) EnableLOSTest ¶
func (tl *TextLabel) EnableLOSTest()
func (*TextLabel) IsLOSTestEnabled ¶
func (*TextLabel) IsStreamedInFor ¶
func (*TextLabel) SetDrawDistance ¶
func (*TextLabel) SetPosition ¶
func (*TextLabel) SetVirtualWorld ¶
func (*TextLabel) VirtualWorld ¶
type TextLabelAttachmentData ¶
type TextLabelAttachmentData[T TextLabelAttachmentTarget] struct { Target T }
func TextLabelAttachedData ¶
func TextLabelAttachedData[T TextLabelAttachmentTarget](tl *TextLabel) (TextLabelAttachmentData[T], error)
type Textdraw ¶
type Textdraw struct {
// contains filtered or unexported fields
}
func (*Textdraw) Alignment ¶
func (td *Textdraw) Alignment() TextDrawAlignment
func (*Textdraw) BackgroundColor ¶
func (*Textdraw) DisableBox ¶
func (td *Textdraw) DisableBox()
func (*Textdraw) DisableProportionality ¶
func (td *Textdraw) DisableProportionality()
func (*Textdraw) DisableSelection ¶
func (td *Textdraw) DisableSelection()
func (*Textdraw) EnableProportionality ¶
func (td *Textdraw) EnableProportionality()
func (*Textdraw) EnableSelection ¶
func (td *Textdraw) EnableSelection()
func (*Textdraw) IsBoxEnabled ¶
func (*Textdraw) IsProportional ¶
func (*Textdraw) IsSelectable ¶
func (*Textdraw) IsShownFor ¶
func (*Textdraw) LetterSize ¶
func (*Textdraw) PreviewModel ¶
func (*Textdraw) PreviewRotation ¶
func (*Textdraw) PreviewVehicleColor ¶
func (td *Textdraw) PreviewVehicleColor() VehicleColor
func (*Textdraw) PreviewZoom ¶
func (*Textdraw) SetAlignment ¶
func (td *Textdraw) SetAlignment(alignment TextDrawAlignment)
func (*Textdraw) SetBackgroundColor ¶
func (*Textdraw) SetBoxColor ¶
func (*Textdraw) SetLetterSize ¶
func (*Textdraw) SetOutline ¶
func (*Textdraw) SetPosition ¶
func (*Textdraw) SetPreviewModel ¶
func (*Textdraw) SetPreviewRotation ¶
func (*Textdraw) SetPreviewVehicleColor ¶
func (td *Textdraw) SetPreviewVehicleColor(color VehicleColor)
func (*Textdraw) SetPreviewZoom ¶
func (*Textdraw) SetStyle ¶
func (td *Textdraw) SetStyle(style TextdrawStyle)
func (*Textdraw) SetTextFor ¶
func (*Textdraw) SetTextSize ¶
func (*Textdraw) Style ¶
func (td *Textdraw) Style() TextdrawStyle
type TextdrawStyle ¶
type TextdrawStyle int
const ( TextdrawStyle0 TextdrawStyle = iota TextdrawStyle1 TextdrawStyle2 TextdrawStyle3 TextdrawStyle4 TextdrawStyle5 TextdrawStyleFontBeckettRegular TextdrawStyleFontAharoniBold TextdrawStyleFontBankGothic TextdrawStylePricedown TextdrawStyleSprite TextdrawStylePreview )
type TrailerUpdateEvent ¶
type Turf ¶
type Turf struct {
// contains filtered or unexported fields
}
func NewTurf ¶
func NewTurf(pos TurfPosition) (*Turf, error)
func (*Turf) FlashForAll ¶
func (*Turf) FlashingColorFor ¶
func (*Turf) HideForAll ¶
func (t *Turf) HideForAll()
func (*Turf) IsFlashingFor ¶
func (*Turf) IsPlayerInside ¶
func (*Turf) IsShownFor ¶
func (*Turf) Position ¶
func (t *Turf) Position() TurfPosition
func (*Turf) SetPosition ¶
func (t *Turf) SetPosition(pos TurfPosition)
func (*Turf) ShowForAll ¶
func (*Turf) StopFlashFor ¶
func (*Turf) StopFlashForAll ¶
func (t *Turf) StopFlashForAll()
type TurfPosition ¶
type UnoccupiedVehicleUpdate ¶
type UnoccupiedVehicleUpdateEvent ¶
type UnoccupiedVehicleUpdateEvent struct {
Vehicle *Vehicle
Player *Player
Update UnoccupiedVehicleUpdate
}
type Vehicle ¶
type Vehicle struct {
// contains filtered or unexported fields
}
func NewStaticVehicle ¶
func NewStaticVehicle(model VehicleModel, pos Vector3, angle float32) (*Vehicle, error)
func NewVehicle ¶
func NewVehicle(model VehicleModel, pos Vector3, angle float32) (*Vehicle, error)
func Vehicles ¶
func Vehicles() []*Vehicle
Gets an array variable of the IDs of the created vehicles on the server.
func (*Vehicle) AddComponent ¶
Adds a 'component' (often referred to as a 'mod' (modification)) to a vehicle. Valid components can be found here: https://www.open.mp/docs/scripting/resources/carcomponentid
func (*Vehicle) AngularVelocity ¶
func (*Vehicle) AreDoorsLocked ¶
func (*Vehicle) AreLightsTurnedOn ¶
func (*Vehicle) AttachTrailer ¶
func (*Vehicle) CloseTrunk ¶
func (v *Vehicle) CloseTrunk()
func (*Vehicle) Color ¶
func (v *Vehicle) Color() VehicleColor
func (*Vehicle) ComponentInSlot ¶
func (*Vehicle) DamageStatus ¶
func (v *Vehicle) DamageStatus() VehicleDamageStatus
func (*Vehicle) DetachTrailer ¶
func (v *Vehicle) DetachTrailer()
func (*Vehicle) DisableObjective ¶
func (v *Vehicle) DisableObjective()
func (*Vehicle) DisableObjectiveFor ¶
func (*Vehicle) DistanceFrom ¶
func (*Vehicle) DoorsState ¶
func (v *Vehicle) DoorsState() VehicleDoorsState
Allows you to retrieve the current state of a vehicle's doors.
func (*Vehicle) EnableObjective ¶
func (v *Vehicle) EnableObjective()
func (*Vehicle) EnableObjectiveFor ¶
func (*Vehicle) HasBeenOccupied ¶
Check if the vehicle was occupied since last spawn.
func (*Vehicle) HydraThrustAngle ¶
func (*Vehicle) IsAlarmTurnedOn ¶
func (*Vehicle) IsEngineStarted ¶
func (*Vehicle) IsHoodOpen ¶
func (*Vehicle) IsObjectiveEnabled ¶
func (*Vehicle) IsRespawning ¶
func (*Vehicle) IsSirenEnabled ¶
func (*Vehicle) IsStreamedInFor ¶
Checks if a vehicle is streamed in for a player. Only nearby vehicles are streamed in (visible) for a player.
func (*Vehicle) IsTrunkOpen ¶
func (*Vehicle) LandingGearState ¶
Gets the current vehicle landing gear state from the latest driver.
func (*Vehicle) LastDriver ¶
Get the last driver of a vehicle.
func (*Vehicle) LastOccupiedAt ¶
func (*Vehicle) LastSpawnedAt ¶
func (*Vehicle) LockDoorsFor ¶
func (*Vehicle) NumberPlate ¶
func (*Vehicle) Passengers ¶
func (*Vehicle) RemoveComponent ¶
Remove a component from a vehicle.
func (*Vehicle) Repair ¶
func (v *Vehicle) Repair()
Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires etc.).
func (*Vehicle) RespawnDelay ¶
Get the respawn delay of a vehicle in seconds.
func (*Vehicle) SetAngularVelocity ¶
Sets the angular X, Y and Z velocity of a vehicle.
func (*Vehicle) SetColor ¶
func (v *Vehicle) SetColor(color VehicleColor)
func (*Vehicle) SetDamageStatus ¶
func (v *Vehicle) SetDamageStatus(damageStatus VehicleDamageStatus)
Sets the various visual damage statuses of a vehicle, such as popped tires, broken lights and damaged panels.
func (*Vehicle) SetDoorsState ¶
func (v *Vehicle) SetDoorsState(state VehicleDoorsState)
Allows you to open and close the doors of a vehicle.
func (*Vehicle) SetHealth ¶
Set a vehicle's health. When a vehicle's health decreases the engine will produce smoke, and finally fire when it decreases to less than 250 (25%).
func (*Vehicle) SetInterior ¶
func (*Vehicle) SetNumberPlate ¶
func (*Vehicle) SetPaintjob ¶
func (*Vehicle) SetRespawnDelay ¶
Set the respawn delay of a vehicle.
func (*Vehicle) SetVelocity ¶
Sets the X, Y and Z velocity of a vehicle.
func (*Vehicle) SetVirtualWorld ¶
Sets the 'virtual world' of a vehicle. Players will only be able to see vehicles in their own virtual world.
func (*Vehicle) SetWindowsState ¶
func (v *Vehicle) SetWindowsState(state VehicleWindowsState)
Allows you to open and close the windows of a vehicle.
func (*Vehicle) StartEngine ¶
func (v *Vehicle) StartEngine()
func (*Vehicle) StopEngine ¶
func (v *Vehicle) StopEngine()
func (*Vehicle) TrainSpeed ¶
func (*Vehicle) TurnOffAlarm ¶
func (v *Vehicle) TurnOffAlarm()
func (*Vehicle) TurnOffLights ¶
func (v *Vehicle) TurnOffLights()
func (*Vehicle) TurnOnAlarm ¶
func (v *Vehicle) TurnOnAlarm()
func (*Vehicle) TurnOnLights ¶
func (v *Vehicle) TurnOnLights()
func (*Vehicle) UnlockDoors ¶
func (v *Vehicle) UnlockDoors()
func (*Vehicle) UnlockDoorsFor ¶
func (*Vehicle) VirtualWorld ¶
Get the virtual world of a vehicle.
func (*Vehicle) WindowsState ¶
func (v *Vehicle) WindowsState() VehicleWindowsState
Allows you to retrieve the current state of a vehicle's windows.
type VehicleColor ¶
func NewRandomVehicleColor ¶
func NewRandomVehicleColor() *VehicleColor
type VehicleDamageStatus ¶
type VehicleDeathEvent ¶
type VehicleDoorsState ¶
type VehicleModEvent ¶
type VehicleModel ¶
type VehicleModel int
const ( VehicleModelLandstalker VehicleModel = iota + 400 VehicleModelBravura VehicleModelBuffalo VehicleModelLinerunner VehicleModelPerrenial VehicleModelSentinel VehicleModelDumper VehicleModelFiretruck VehicleModelTrashmaster VehicleModelStretch VehicleModelManana VehicleModelInfernus VehicleModelVoodoo VehicleModelPony VehicleModelMule VehicleModelCheetah VehicleModelAmbulance VehicleModelLeviathan VehicleModelMoonbeam VehicleModelEsperanto VehicleModelTaxi VehicleModelWashington VehicleModelBobcat VehicleModelMrWhoopee VehicleModelBFInjection VehicleModelHunter VehicleModelPremier VehicleModelEnforcer VehicleModelSecuricar VehicleModelBanshee VehicleModelPredator VehicleModelBus VehicleModelRhino VehicleModelBarracks VehicleModelHotknife VehicleModelArticleTrailer1 VehicleModelPrevion VehicleModelCoach VehicleModelCabbie VehicleModelStallion VehicleModelRumpo VehicleModelRCBandit VehicleModelRomero VehicleModelPacker VehicleModelMonster VehicleModelAdmiral VehicleModelSqualo VehicleModelSeasparrow VehicleModelPizzaBoy VehicleModelTram VehicleModelArticleTrailer2 VehicleModelTurismo VehicleModelSpeeder VehicleModelReefer VehicleModelTropic VehicleModelFlatbed VehicleModelYankee VehicleModelCaddy VehicleModelSolair VehicleModelRCVan VehicleModelSkimmer VehicleModelPCJ600 VehicleModelFaggio VehicleModelFreeway VehicleModelRCBaron VehicleModelRCRaider VehicleModelGlendale VehicleModelOceanic VehicleModelSanchez VehicleModelSparrow VehicleModelPatriot VehicleModelQuad VehicleModelCoastguard VehicleModelDinghy VehicleModelHermes VehicleModelSabre VehicleModelRustler VehicleModelZR350 VehicleModelWalton VehicleModelRegina VehicleModelComet VehicleModelBMX VehicleModelBurrito VehicleModelCamper VehicleModelMarquis VehicleModelBaggage VehicleModelDozer VehicleModelMaverick VehicleModelNewsChopper VehicleModelRancher VehicleModelFBIRancher VehicleModelVirgo VehicleModelGreenwood VehicleModelJetmax VehicleModelHotringC VehicleModelSandking VehicleModelBlistaCompact VehicleModelPoliceMaverick VehicleModelBoxville VehicleModelBenson VehicleModelMesa VehicleModelRCGoblin VehicleModelHotringA VehicleModelHotringB VehicleModelBloodringBanger VehicleModelRancherLure VehicleModelSuperGT VehicleModelElegant VehicleModelJourney VehicleModelBike VehicleModelMountainBike VehicleModelBeagle VehicleModelCropdust VehicleModelStuntplane VehicleModelTanker VehicleModelRoadTrain VehicleModelNebula VehicleModelMajestic VehicleModelBuccaneer VehicleModelShamal VehicleModelHydra VehicleModelFCR900 VehicleModelNRG500 VehicleModelHPV1000 VehicleModelCementTruck VehicleModelTowtruck VehicleModelFortune VehicleModelCadrona VehicleModelFBITruck VehicleModelWillard VehicleModelForklift VehicleModelTractor VehicleModelCombineHarvester VehicleModelFeltzer VehicleModelRemington VehicleModelSlamvan VehicleModelBlade VehicleModelFreight VehicleModelBrownstreak VehicleModelVortex VehicleModelVincent VehicleModelBullet VehicleModelClover VehicleModelSadler VehicleModelFiretruckLA VehicleModelHustler VehicleModelIntruder VehicleModelPrimo VehicleModelCargobob VehicleModelTampa VehicleModelSunrise VehicleModelMerit VehicleModelUtilityVan VehicleModelNevada VehicleModelYosemite VehicleModelWindsor VehicleModelMonsterA VehicleModelMonsterB VehicleModelUranus VehicleModelJester VehicleModelSultan VehicleModelStratum VehicleModelElegy VehicleModelRaindance VehicleModelRCTiger VehicleModelFlash VehicleModelTahoma VehicleModelSavanna VehicleModelBandito VehicleModelFreightTrailer VehicleModelStreakTrailer VehicleModelKart VehicleModelMower VehicleModelDuneride VehicleModelSweeper VehicleModelBroadway VehicleModelTornado VehicleModelAT400 VehicleModelDFT30 VehicleModelHuntley VehicleModelStafford VehicleModelBF400 VehicleModelNewsvan VehicleModelTug VehicleModelPetrolTrailer VehicleModelEmperor VehicleModelWayfarer VehicleModelEuros VehicleModelHotdog VehicleModelClub VehicleModelFreightBoxTrailer VehicleModelArticleTrailer3 VehicleModelAndromada VehicleModelDodo VehicleModelRCCam VehicleModelLaunch VehicleModelLSPDCar VehicleModelSFPDCar VehicleModelLVPDCar VehicleModelRanger VehicleModelPicador VehicleModelSWAT VehicleModelAlpha VehicleModelPhoenix VehicleModelGlendaleDamaged VehicleModelSadlerDamaged VehicleModelBaggageTrailerA VehicleModelBaggageTrailerB VehicleModelStairsTrailer VehicleModelBoxburg VehicleModelFarmTrailer VehicleModelUtilityTrailer )
func (VehicleModel) FrontBumperZ ¶
func (m VehicleModel) FrontBumperZ() float32
func (VehicleModel) FrontSeatPosition ¶
func (m VehicleModel) FrontSeatPosition() Vector3
func (VehicleModel) FrontWheelsPosition ¶
func (m VehicleModel) FrontWheelsPosition() Vector3
func (VehicleModel) MiddleWheelsPosition ¶
func (m VehicleModel) MiddleWheelsPosition() Vector3
func (VehicleModel) PetrolCapPosition ¶
func (m VehicleModel) PetrolCapPosition() Vector3
func (VehicleModel) RearBumperHeight ¶
func (m VehicleModel) RearBumperHeight() float32
func (VehicleModel) RearSeatPosition ¶
func (m VehicleModel) RearSeatPosition() Vector3
func (VehicleModel) RearWheelsPosition ¶
func (m VehicleModel) RearWheelsPosition() Vector3
func (VehicleModel) Size ¶
func (m VehicleModel) Size() Vector3
type VehiclePaintJobEvent ¶
type VehicleResprayEvent ¶
type VehicleResprayEvent struct {
Player *Player
Vehicle *Vehicle
Color VehicleColor
}
type VehicleSpawnEvent ¶
type VehicleSpawnEvent struct {
Vehicle *Vehicle
}
type VehicleStreamInEvent ¶
type VehicleStreamOutEvent ¶
type VehicleWindowsState ¶
type Weapon ¶
type Weapon int
const ( WeaponColt45 Weapon = iota + 22 WeaponSilenced WeaponDeagle WeaponShotgun WeaponSawedoff WeaponShotgspa WeaponUZI WeaponMP5 WeaponAK47 WeaponM4 WeaponTEC9 WeaponRifle WeaponSniper WeaponRocketLauncher WeaponHeatSeeker WeaponFlameThrower WeaponMinigun WeaponSatchel WeaponBomb WeaponSprayCan WeaponFireExtinguisher WeaponCamera WeaponNight_Vis_Goggles WeaponThermal_Goggles WeaponParachute )
func (Weapon) SlotIndex ¶
func (w Weapon) SlotIndex() WeaponSlotIndex
type WeaponSlot ¶
type WeaponSlotIndex ¶
type WeaponSlotIndex int
const ( WeaponSlotIndexUnknown WeaponSlotIndex = iota - 1 WeaponSlotIndexUnarmed WeaponSlotIndexMelee WeaponSlotIndexPistol WeaponSlotIndexShotgun WeaponSlotIndexMachineGun WeaponSlotIndexAssaultRifle WeaponSlotIndexLongRifle WeaponSlotIndexArtillery WeaponSlotIndexExplosives WeaponSlotIndexEquipment WeaponSlotIndexGift WeaponSlotIndexGadget WeaponSlotIndexDetonator )