Difference between revisions of "Player onuse"
From Fortress Forever Wiki
Jump to navigationJump to search (Created page with "This callback is called whenever the player presses the ''USE'' button. ==Usage== <pre> function player_onuse( player ) local MyName = player:GetName() -- Says the p...") |
|||
Line 1: | Line 1: | ||
+ | {{Infobox manual/Header}} | ||
+ | {{Infobox mapping}} | ||
+ | ==player_onuse ( player )== | ||
This callback is called whenever the player presses the ''USE'' button. | This callback is called whenever the player presses the ''USE'' button. | ||
Line 11: | Line 14: | ||
</pre> | </pre> | ||
'''Return false''' to prevent the use from happening. | '''Return false''' to prevent the use from happening. | ||
+ | |||
+ | [[Category:Lua Callbacks]][[Category:Global Callbacks]] | ||
+ | {{Infobox manual/Footer}} |
Latest revision as of 16:13, 30 March 2015
player_onuse ( player )This callback is called whenever the player presses the USE button. Usagefunction player_onuse( player ) local MyName = player:GetName() -- Says the players name on use. ChatToPlayer(player, "My Name is "..MyName.."!") end Return false to prevent the use from happening. |