SetPlayerNametagShowing

From Multi Theft Auto: Wiki
Revision as of 01:35, 11 April 2007 by Ransom (talk | contribs) (→‎Example)
Jump to navigation Jump to search

This fake function is for use with blah & blah and does blahblahblabhalbhl

Syntax

bool setPlayerNametagShowing ( player thePlayer, bool showing )

Required Arguments

  • argumentName: description

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • argumentName2: description
  • argumentName3: description

Returns

Returns true if blah, false otherwise.

Example

This script will turn off player tags for everyone

root = getRootElement ()
players = {}
--Make a players varible and define it as a table
players = getElementsByType ( "player" )
--Store all the players in the server into the table

addEventHandler ( "onResourceStart", root, "ResourceStart" )
function ResourceStart ( name, root )
	for k,v in players do
	--for all the players in the table
	setPlayerNametagShowing ( v, false )
	--turn off their nametag
	end
end

addEventHandler ( "onPlayerJoin", root, "PlayerJoin" )
function PlayerJoin ()
	setPlayerNametagShowing ( v, false )
	--Whoever joins the server should also have their nametags deactivated
end

See Also

Template:FunctionArea functions -- leave this unless you complete the function