IsCursorShowing: Difference between revisions
Jump to navigation
Jump to search
JonChappell (talk | contribs) No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
This function is used to determine whether or not a player's cursor is showing for 'click-events'. | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool isCursorShowing ( player thePlayer ) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''thePlayer''' The player you want to check | |||
*''' | |||
===Returns=== | ===Returns=== | ||
Returns ''true'' if the player's cursor is showing for 'click-events'. | |||
Returns ''true'' if | |||
==Example== | ==Example== | ||
This example shows the players cursor, then prints "success" if it was shown successfully. | |||
This example | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
-- | 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 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Cursor_functions}} | |||
{{ | |||
Revision as of 21:03, 3 November 2006
This function is used to determine whether or not a player's cursor is showing for 'click-events'.
Syntax
bool isCursorShowing ( player thePlayer )
Required Arguments
- thePlayer The player you want to check
Returns
Returns true if the player's cursor is showing for 'click-events'.
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