OnPlayerRespawn

From GT-MP
Jump to: navigation, search
OnPlayerRespawn
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

This type of event is used for handling your code when you Respawn.

Requirements

First of all, it should be defined in your Main constructor for it to be called, otherwise it wouldn't be initiated at all!

   public Main()
   {
      API.onPlayerRespawn += OnPlayerRespawnHandler;
   }

Usage example(s)

   private void OnPlayerRespawnHandler(Client player)
   {
      API.sendChatMessageToPlayer(player, "Yey! You've been spawned!");
   }

References