Skip to content
TheHellBox edited this page Oct 2, 2019 · 1 revision

Functions:

player:AWControl(entity)

Enter entity control(Steering wheel, turret, etc)

player:ExitControl()

Exit Entity Control

player:GetEntityUnderControl()

Get entity controlled by player

player:AWGiveAmmo(ammo)

Set ammo to true to give player ammo, false to take it(Used for reloading weapons)

player:AWHasAmmo()

Checks if player has ammo

player:AddPoints(amount)

Add pointshop points

player:SetPoints(amount)

Set pointshop points

player:CanAfford(cost)

Checks if player can afford something

player:HasItem(category, item)

Category and item arguments are ids. Refer to point_shop_config.lua to get those

player:Unlock(category, item)

Unlock item in pointshop. Category and item arguments are ids. Refer to point_shop_config.lua to get those

player:SetAWTeam(team)

Sets players team.

player:SetCurrentShip(ship_id)

Moves player to another ship

player:IsSpectator()

Checks if player is spectator

player:SetSpectator(is_spectator)

Makes player spectator

player:IsInControl()

Checks if player controlling entity

player:IsLeader()

Checks if player is leader

player:GetAWTeamName()

Gets team name