Business.GetEmployedAt
Skip to content
mnscript
Business[] Business.GetEmployedAt(Player) 

Description ​

Returns an array containing all the businesses a player is employed at.

Arguments ​

Player - The player

Returns ​

Business[] - An array of businesses

Example ​

msc
using Console;
using Business;
using Array;
using Player;

Player ply = Player.GetBySteamID("STEAM_0:0:64651161");

Business[] businesses = Business.GetEmployedAt(ply);

number len = Array.Length(businesses);
number i = 1;

// Print all the names of the businesses a player is employed at
while (i < len + 1)
{
    Business business = businesses[i];

    Console.WriteLine(business.GetName());

    i = i + 1;
}