SetPlayerName

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

Set the Name of a Player.

Syntax

API.setPlayerName(Client player, string newName);

Required Arguments

  • player: parameter input should be in Client type.
  • newName: parameter input should be in string type, where limit is 40 characters and minimum 0.

NOTE: This function returns data in bool type.

Usage example(s)

Example Description

API.setPlayerName(Client player, string newName);

OOP

player.name = newName;

References