PlayerRuleTriggered
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.`);
});