GetVehiclePlateText: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{Server client function}}
{{Server client function}}
{{Needs Checking|This function doesn't work, mantis #2457 --[[User:Norby89|Norby89]] 13:47, 26 August 2007 (CDT)}}
__NOTOC__
__NOTOC__
This function is used to retrieve the text on the number plate of a specified vehicle.
This function is used to retrieve the text on the number plate of a specified vehicle.

Revision as of 18:47, 26 August 2007

Dialog-information.png This article needs checking.

Reason(s): This function doesn't work, mantis #2457 --Norby89 13:47, 26 August 2007 (CDT)

This function is used to retrieve the text on the number plate of a specified vehicle.

Syntax

string getVehiclePlateText ( vehicle theVehicle )

Required Arguments

  • theVehicle: A handle to the vehicle that you wish to retrieve the plate text from.

Returns

Returns a string that coresponds to the plate on the text or false if a bad argument was passed or if the vehicle is not a car.

Example

Click to collapse [-]
Server

This example outputs the text on the license plate of the vehicle the player is driving to the chatbox. <syntaxhighlight lang="lua"> function scriptPlate ( player, command )

 local aVehicle = getPlayerOccupiedVehicle ( getLocalPlayer() )
 local text = getVehiclePlateText ( aVehicle )
 if ( text and aVehicle ) then
   outputChatBox ( "text" )
 else outputChatBox ( "your vehicle has no licence plate or you're not in a vehicle" )
 end

end addCommandHandler( "plate", scriptPlate )

</syntaxhighlight>

See Also