Category:TODO: Example

From RAGE Multiplayer Wiki
Jump to: navigation, search

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.
  • Client-side scripts must be in red 'client-side' containers and server-side scripts must be in blue 'server-side' containers.

Example:

That's example will just call server side event, from client, if player screen size not a 1280x1024.

Client-Side
let checkResolution = () => {
	let res = mp.game.graphics.getScreenActiveResolution(x, y);
	
	if (!((res.x == 1280) && (res.y == 1024))) {
		mp.events.callRemote("kickMeImBad", res.x, res.y);
	};
};

checkResolution();


Server-Side
let blahBlah = (player, sx, sy) => {
	console.log(`${player.name} bad boy :c, his screen size ${sx}x${sy}`);
	player.kick();
};

mp.events.add("kickMeImBad", blahBlah);
  • 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 2,494 total.

(previous page) (next page)

A

(previous page) (next page)