Skip to content
nyfrk edited this page Feb 3, 2022 · 2 revisions

ISettlers4Api::StoreGood method

Specifies what goods a storage shall store.

Syntax

BOOL ISettlers4Api::StoreGood(
	DWORD building, 
	S4_GOOD_ENUM good, 
	BOOL enable,
	DWORD player
);

Parameters

building

The index of the building whose storage settings are being changed. The player should own this building. It is usually a storage building.

good

The good type you want to start or stop storing. See S4_GOOD_ENUM for a list of possible good types. The building should be able to store the specified good.

enable

If TRUE the building will start to store goods of the specified type. If FALSE it will stop storing them.

player

The player who issues the command. Use 0 (zero) to issue this event as the local player.

Return value

If this method could append the event successfully it will return TRUE. If an error occurred it will return FALSE.

Remarks

The corresponding network event id of the command is ID 5044.

Requirements

Minimum API Level 2
Target Edition Any
Header S4ModApi.h
Library S4ModApi.lib
DLL S4ModApi.dll

See also

ISettlers4Api

Clone this wiki locally