CreateMarker: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Needs_Checking|What type are the roatations?|[[User:EAi|EAi]]}}
{{Needs_Checking|Should R,G,B be an optional argument?|[[User:JonChappell|JonChappell]]}}
{{Needs_Checking|Should R,G,B be an optional argument?|[[User:EAi|EAi]]}}


==Description==
==Description==

Revision as of 17:38, 28 March 2006


Dialog-information.png This article needs checking.

Reason(s): Should R,G,B be an optional argument?

Description

This function creates a marker and returns a handle to the created marker. If it fails, it will return false.

Syntax

marker createMarker ( int id, float x, float y, float z, float r, float g, float b )

Required Arguments

  • id: The id number of the marker being created.
  • x: A floating point number representing the X coordinate on the map.
  • y: A floating point number representing the Y coordinate on the map.
  • z: A floating point number representing the Z coordinate on the map.
  • r: A floating point number representing the amount of red to use in the colouring of the marker.
  • g: A floating point number representing the amount of green to use in the colouring of the marker.
  • b: A floating point number representing the amount of blue to use in the colouring of the marker.

Example

function onPlayerChat ( player, chat )
  if ( strtok ( chat, 1, 32 ) == "!createmarker" ) then
    x, y, z = getPlayerPosition ( player )
    createMarker ( 520, x + 5, y, z, 1,0,0 )
    playerPM ( player, "You got a red marker" )
  end
end