PlayerRuleTriggered

From RAGE Multiplayer Wiki
Revision as of 11:09, 30 April 2019 by RoboN1X (talk | contribs) (category)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This event is triggered when server rule check failed for local player.

Parameters

  • rule - name of rule
  • counter - counter of failed attempts

Example

Client-Side
mp.events.add("playerRuleTriggered", (rule, counter) =>
{
	let color = counter > 20 ? "red" : (counter > 10 ? "yellow" : "green");
	mp.gui.chat.push(`Warning: {${color}}Your ${rule} is bad.`);
});