SetPlayerWeaponTint

From GT-MP
Jump to: navigation, search
SetPlayerWeaponTint
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

This function sets the given weapon's tint of given player.


Syntax

API.setPlayerWeaponTint(Client player, WeaponHash weapon, WeaponTint tint);

Required Arguments

  • player: parameter input should be in Client type.
  • weapon: parameter input should be in WeaponHash type.
  • tint: parameter input should be in WeaponTint type. See Weapons Tints and Mk2 Weapon Tints.

Usage example(s)

/weapontint or /wtint command from the freeroam resource:

In C#
Server-Side Function

[Command("weapontint", Alias = "wtint")]
public void SetWeaponTintCmd(Client sender, WeaponTint tint)
{
    API.setPlayerWeaponTint(sender, API.getPlayerCurrentWeapon(sender), tint);
}

References