GetPlayerFromHwid

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


Gets a player based on his Unique Hardware ID.

Syntax

Client API.getPlayerFromHwid(string hwid);

Required Arguments

  • hwid: parameter input should be in string type.


Dialog-warning.png

Note: This function returns data in Client type.

Usage example(s)

The command below will send a message to a given player based on his Unique Hardware ID.

In C#
Server-Side Function

[Command("sayhi", "Usage: /sayhi <hardware_id>")]
public void SayHiToPlayer(Client player, String hardwareId)
{
    var target = API.getPlayerFromHwid(hardwareId);
    API.sendChatMessageToPlayer(target, "We can see your Unique Hardware ID!");
}

Changelog

Version Description
1.638.634 Release.

References