Category:TODO: Example: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "These are the pages that requires Examples. If you are able to put a working example, then we will be very thankful for your contribution. == Requirements == * Should be fu...")
 
No edit summary
Line 6: Line 6:


* Should be fully clear and working example
* Should be fully clear and working example
* Should be in a code block. '''Example: '''
* Should be in a code block.  
'''Example: '''


<syntaxhighlight lang="javascript" style="width: 98%; background-color: #E4F1FE;">
<syntaxhighlight lang="javascript" style="width: 98%; background-color: #E4F1FE;">

Revision as of 19:13, 29 September 2017

These are the pages that requires Examples.

If you are able to put a working example, then we will be very thankful for your contribution.

Requirements

  • Should be fully clear and working example
  • Should be in a code block.

Example:

function playerQuitHandler(player, exitType, reason) {
  if (exitType != "kicked") {
    var str = player.name + " quit.";
  } else {
    var str = player.name + " kicked. Reason: " + reason + ".";
  }
  console.log(str);
}

mp.events.add("playerQuit", playerQuitHandler);
  • Description for the code block you provided.

When you finish your example, Don't forget to remove the [[Category:TODO: Example]]. We thank you for your contribution.

Pages in category "TODO: Example"

The following 200 pages are in this category, out of 6,572 total.

(previous page) (next page)

A

(previous page) (next page)