ShowCursor

From Multi Theft Auto: Wiki
Revision as of 21:06, 3 November 2006 by MrJax (talk | contribs)
Jump to navigation Jump to search

This function is used to show or hide a player's cursor for 'click-events'.

Syntax

bool showCursor ( player thePlayer, bool show )

Required Arguments

  • thePlayer The player you want to show or hide the cursor of.
  • show A boolean value determining whether to show ( true ) or hide ( false ) the cursor.

Returns

Returns true if the player's cursor was shown or hidden successfully, otherwise false.

Example

This example shows the players cursor, then prints "success" if it was shown successfully.

thePlayer = getPlayerFromNick ( "Dave" ) -- grab the player named Dave
if ( thePlayer ) then -- if we got him
  showCursor ( thePlayer, true ) -- make his cursor show
  if ( isCursorShowing ( thePlayer ) ) then -- did it show?
    outputChatBox ( "success" ) -- print "success" to the chat box
  end
end

See Also