GetPlayerFromSocialClubName

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


Returns the player based on his Social Club Name.

Syntax

Client API.getPlayerFromSocialClubName(string socialClubName);

Required Arguments

  • socialClubName: 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 "hello message" to a given player based on his social club name.

Example usage: /sayhi DurtyFree

In C#
Server-Side Function

[Command("sayhi", "Usage: /sayhi <SocialClubName>")]
public void SayHiToPlayer(Client player, String playerSocialClub)
{
    var boss = API.getPlayerFromSocialClubName(playerSocialClub);
    API.sendChatMessageToPlayer(boss, "Hello " + playerSocialClub + " !");
}

Changelog

Version Description
1.638.634 Release.

References