βš’οΈ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

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.

StopJob

Stops certain activity

Server side - Functions

AddMoneyToPlayerCompany

Expected data

  • src - Player ID

  • moneyCount - Number of money

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

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

RemoveCompanyMoney

Takes money out of the company

  • comp - Company short name

  • money - Value

RemoveMoneyFromCompany

This takes money out of the company even including the reason

  • comp - Company name

  • reason - Reason for invoice

  • money - Value

checkPlayerOwnershop

Check if is player owner of some company

returns

  • company name

checkPlayerMemberShip

returns

  • company name

setPlayerCompany

player - playerid

company - companyshort name

gradename - Label

grade - level

allowCompanyActivity

company - Company short name

activity - Activity name

CanCompanyDo

Can player company do some activity?

return true / false

Usefull functions in pls_companies

GetPlayerFullName

Writes the player's full name

Last updated