GetMaxPlayers

From Multi Theft Auto: Wiki
Revision as of 18:51, 18 February 2016 by DABL (talk | contribs) (→‎Example)
Jump to navigation Jump to search

هذه الوظيفة تقوم بأحضار اقصي من الاعبين يسمح به في الخادم.

Syntax

int getMaxPlayers ()

Returns

تحضر لك اقصي مسموح من الاعبين داخل السيرفر.

Example

This example outputs the current number of players together with the maximum number of players when a player joins.

function showPlayers()
	outputChatBox("There are "..getPlayerCount().."/"..getMaxPlayers().." players playing.",source) --output a message to the joined player informing the player count and max players.
end
addEventHandler("onPlayerJoin",root,showPlayers) --Add an event handler to call the function when a player joins.

See Also