⚒️For developers

Client side - Functions

CanPlayerCompanyDo

This function is used to check if the player's company has access to a certain activity.

Return : true / false

CanPlayerCompanyDo(activityName)

PlayerDoJob

This checks if the player is already doing some work.

Return: true / false

PlayerDoJob()

PlayerDoThisJob

Checks if the player is doing a certain activity.

returns : true / false

PlayerDoThisJob(activityName)

StartJob

Start a job only serves as a helper function, so you don't have to worry about whether the player already has a job active.

StartJob(activityName)

StopJob

Stops certain activity

StopJob(activityName)

Server side - Functions

AddMoneyToPlayerCompany

Expected data

  • src - Player ID

  • moneyCount - Number of money

  • reason - This will be displayed on the owner's tablet.

AddMoneyToCompany(src, moneyCount, invoiceReason)

Client side - Exports

Server side - Exports

It all starts with exports.pls_companies.functionName

AddMoneyToCompany

  • Player - ID

  • Value - Value of money

  • Reason - Reason to invoice

AddMoneyToCompany(player,value,reason)RemoveCompanyMoney(comp,money)

RemoveCompanyMoney

Takes money out of the company

  • comp - Company short name

  • money - Value

RemoveCompanyMoney(comp,money)

RemoveMoneyFromCompany

This takes money out of the company even including the reason

  • comp - Company name

  • reason - Reason for invoice

  • money - Value

RemoveMoneyFromCompany(comp,reason,money)

checkPlayerOwnershop

Check if is player owner of some company

returns

  • company name

checkPlayerOwnership(src)

checkPlayerMemberShip

returns

  • company name

checkPlayerMembership(src)
checkPlayerCompany(src)

setPlayerCompany

player - playerid

company - companyshort name

gradename - Label

grade - level

setPlayerCompany(player, company,gradename,grate)

allowCompanyActivity

company - Company short name

activity - Activity name

allowCompanyActivity(company,activity)

CanCompanyDo

Can player company do some activity?

return true / false

CanCompanyDo(companyName, activity)

Usefull functions in pls_companies

GetPlayerFullName

Writes the player's full name

local playerName = BRIDGE.GetPlayerFullName(playerId)

Last updated