TriggerClientEventToPlayers

From GTA Network Wiki
Jump to: navigation, search

TriggerClientEventToPlayers
Server-Side Function

utilities-terminal.png Server-Side csharp.png C#

Triggers a client-side script event call from server-side to a given players list. To trigger an event for a single player, use TriggerClientEvent.

Syntax

void NAPI.ClientEvent.TriggerClientEventToPlayers(Client[] players, string eventName, params object[] args);

Required Arguments

  • players: parameter input should be in Client[] type.
  • eventName: parameter input should be in string type.
  • args: parameter input should be in object type. See the Synchronized Types for which types of objects you can pass here.

Usage example

NAPI.ClientEvent.TriggerClientEventToPlayers(new Client[] { player1, player2, player3 }, "MyEvent", 1, 2, 3, "Test", "Go", "Me");

Changelog

Version Description
1.0 Release.

References