GetPlayerNametagText

From Multi Theft Auto: Wiki
Revision as of 06:22, 11 April 2007 by Ransom (talk | contribs)
Jump to navigation Jump to search

This will allow you to retrieve the name tag a player is currently using.

Syntax

string getPlayerNametagText ( player thePlayer )

Required Arguments

  • thePlayer: The person whose name tag you want to retrieve

Returns

Returns true if successful, false otherwise.

Example

This will announce that a player has entered a car whenever a player enters a car.

addEventHandler ( "onVehicleEnter", root, "VehicleEnter" )
function VehicleEnter ( player, seat, jacked )
playersname = getPlayerNametagText ( player )
--Store the name of the person who entered the car
outputChatBox ( playersname.." entered a car!" )
--output the name tag of the person who entered the car
end

See Also