PlayerResurrect

From RAGE Multiplayer Wiki
Revision as of 05:54, 22 August 2024 by SugarD-x (talk | contribs) (Fixed a capitalization error in the Javascript example.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This event is called everytime a player resurrects.

Client-Side Event

 C#  JavaScript



C# Syntax

public delegate void OnPlayerResurrectDelegate();

Parameters

This event has no parameters

Example

The example below shows a chat message to the client when they respawn.

Events.OnPlayerResurrect += OnPlayerResurrect;
public void OnPlayerResurrect()
{
    RAGE.Chat.Output($"YOU'RE ALIVE!?");
}


JavaScript Syntax

mp.events.add('playerResurrect', () => {});

Parameters

This event has no parameters

Example

The example below shows up a message for a player when he resurrects.

mp.events.add('playerResurrect', () => {
    mp.gui.chat.push('Like a phoenix raised from the ashes, you came back to us!');
});


See also