SetCrewStatus

Category: Objects / Crew
Since engine version: 4.9.5.0 CE

Description

Adds or removes an object (usually a clonk) to or from the crew of a player. The object must have the CrewMember property set in the DefCore.

Syntax

bool SetCrewStatus (int iPlr, bool fInCrew, object pCrew);

Parameters

iPlr:
Player number of the player whose crew you want to change.
fInCrew:
true if you want to add a clonk to the crew and false if you want to remove him.
pCrew:
CrewMember object to be added or removed.

Example

var nclnk = CreateObject(CLNK, 0, 0, GetOwner());
SetCrewStatus(GetOwner(), true, nclnk);
This script creates a new clonk and adds it to the crew list of the owner.
See also: CrewMember, GetCrew, GrabObjectInfo, MakeCrewMember, OCF_CrewMember
Clonkonaut, Mai 2008